-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3a6512
commit ff91af2
Showing
5 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class ShrimpoVotingCategoryScore < ApplicationRecord | ||
belongs_to :shrimpo_entry | ||
belongs_to :shrimpo_voting_category | ||
end |
13 changes: 13 additions & 0 deletions
13
db/migrate/20241005190710_create_shrimpo_voting_cateogry_score.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class CreateShrimpoVotingCateogryScore < ActiveRecord::Migration[7.0] | ||
def change | ||
create_table :shrimpo_voting_cateogry_scores do |t| | ||
t.references :shrimpo_entry, null: false, index: { name: 'shrimpo_entry_score' } | ||
t.references :shrimpo_voting_category, null: false, index: { name: 'voting_cat_score' } | ||
|
||
t.integer :score | ||
t.integer :ranking | ||
|
||
t.timestamps | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,9 @@ | |
expect(TrophyAward.where(user: entry1.user, shrimpo_entry: entry1, trophy: consolation_trophy).count).to be >= 1 | ||
end | ||
|
||
xit 'tallys results for mega shrimpo' do | ||
end | ||
|
||
it 'cant vote on own entry' do | ||
dj1 = User.create role: 'dj', username: 'dakota', email: "[email protected]", password: "2boobies", time_zone: "UTC", fruit_ticket_balance: 1000, level: 3 | ||
dj2 = User.create role: 'dj', username: 'seacuke', email: "[email protected]", password: "2boobies", time_zone: "UTC" | ||
|