diff options
-rw-r--r-- | app/controllers/games_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/tournaments_controller.rb | 2 | ||||
-rw-r--r-- | app/views/games/_form.html.erb | 4 | ||||
-rw-r--r-- | app/views/games/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/games/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/games/show.html.erb | 5 | ||||
-rw-r--r-- | app/views/games/show.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/tournaments/_form.html.erb | 6 | ||||
-rw-r--r-- | app/views/tournaments/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/tournaments/show.html.erb | 4 | ||||
-rw-r--r-- | app/views/tournaments/show.json.jbuilder | 2 | ||||
-rw-r--r-- | db/migrate/20140428092839_create_simple_captcha_data.rb (renamed from db/migrate/20140427131527_create_simple_captcha_data.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132832_create_mailboxer.mailboxer_engine.rb (renamed from db/migrate/20140427171523_create_mailboxer.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132833_add_notified_object.mailboxer_engine.rb (renamed from db/migrate/20140427171524_add_notified_object.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132834_add_notification_code.mailboxer_engine.rb (renamed from db/migrate/20140427171525_add_notification_code.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132835_add_attachments.mailboxer_engine.rb (renamed from db/migrate/20140427171526_add_attachments.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132836_rename_receipts_read.mailboxer_engine.rb (renamed from db/migrate/20140427171527_rename_receipts_read.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132837_add_global_notification_support.mailboxer_engine.rb (renamed from db/migrate/20140427171528_add_global_notification_support.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132845_create_delayed_jobs.rb (renamed from db/migrate/20140427171530_create_delayed_jobs.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132852_create_servers.rb (renamed from db/migrate/20140427171533_create_servers.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132900_create_matches.rb (renamed from db/migrate/20140427171537_create_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132907_create_teams.rb (renamed from db/migrate/20140427171541_create_teams.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132914_create_alerts.rb (renamed from db/migrate/20140427171545_create_alerts.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132922_create_pms.rb (renamed from db/migrate/20140427171548_create_pms.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132929_create_tournaments.rb (renamed from db/migrate/20140427171552_create_tournaments.rb) | 1 | ||||
-rw-r--r-- | db/migrate/20140428132937_create_games.rb (renamed from db/migrate/20140427171556_create_games.rb) | 1 | ||||
-rw-r--r-- | db/migrate/20140428132944_create_users.rb (renamed from db/migrate/20140427171600_create_users.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132951_create_sessions.rb (renamed from db/migrate/20140427171603_create_sessions.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428132958_create_brackets.rb (renamed from db/migrate/20140427171607_create_brackets.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133006_create_game_settings.rb (renamed from db/migrate/20140427171611_create_game_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133013_create_tournament_settings.rb (renamed from db/migrate/20140427171615_create_tournament_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133020_create_tournament_stages.rb (renamed from db/migrate/20140427171618_create_tournament_stages.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133026_create_statistics.rb (renamed from db/migrate/20140427171622_create_statistics.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133033_create_remote_usernames.rb (renamed from db/migrate/20140427171626_create_remote_usernames.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133041_create_bracket_matches.rb (renamed from db/migrate/20140427171629_create_bracket_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133048_create_api_requests.rb (renamed from db/migrate/20140427171633_create_api_requests.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133055_create_tournament_players_join_table.rb (renamed from db/migrate/20140427171637_create_tournament_players_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133102_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140427171640_create_tournament_hosts_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133109_create_team_user_join_table.rb (renamed from db/migrate/20140427171644_create_team_user_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133116_create_match_team_join_table.rb (renamed from db/migrate/20140427171647_create_match_team_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140428133136_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140427171658_add_hidden_attrs_to_user.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 4 | ||||
-rw-r--r-- | test/controllers/games_controller_test.rb | 4 | ||||
-rw-r--r-- | test/controllers/tournaments_controller_test.rb | 4 | ||||
-rw-r--r-- | test/fixtures/games.yml | 2 | ||||
-rw-r--r-- | test/fixtures/tournaments.yml | 2 |
46 files changed, 13 insertions, 38 deletions
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 3ccd7be..d014a1c 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -67,6 +67,6 @@ class GamesController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def game_params - params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method) + params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method) end end diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index c06c16c..0947ac8 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -184,7 +184,7 @@ class TournamentsController < ApplicationController def tournament_attribute_params params[:num_stages] ||= 1 if params[:tournament] - p = params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method) + p = params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method) if p[:game_id] game = Game.find(p[:game_id]) p[:min_players_per_team] ||= game.min_players_per_team diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb index e7def85..f796f87 100644 --- a/app/views/games/_form.html.erb +++ b/app/views/games/_form.html.erb @@ -36,10 +36,6 @@ <%= f.number_field :max_teams_per_match %> </div> <div class="field"> - <%= f.label :sampling_method %><br> - <%= f.text_field :sampling_method %> - </div> - <div class="field"> <%= f.label :scoring_method %><br> <%= f.text_field :scoring_method %> </div> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index 565320c..f12253c 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -9,7 +9,6 @@ <th>Max players per team</th> <th>Min teams per match</th> <th>Max teams per match</th> - <th>Sampling method</th> <th>Scoring method</th> <th></th> <th></th> @@ -26,7 +25,6 @@ <td><%= game.max_players_per_team %></td> <td><%= game.min_teams_per_match %></td> <td><%= game.max_teams_per_match %></td> - <td><%= game.sampling_method %></td> <td><%= game.scoring_method %></td> <td><%= link_to 'Show', game %></td> <td><%= link_to 'Edit', edit_game_path(game) %></td> diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder index 0e9769b..d196201 100644 --- a/app/views/games/index.json.jbuilder +++ b/app/views/games/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@games) do |game| - json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method + json.extract! game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method json.url game_url(game, format: :json) end diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb index 4c67493..6184784 100644 --- a/app/views/games/show.html.erb +++ b/app/views/games/show.html.erb @@ -29,11 +29,6 @@ </p> <p> - <strong>Sampling method:</strong> - <%= @game.sampling_method %> -</p> - -<p> <strong>Scoring method:</strong> <%= @game.scoring_method %> </p> diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder index 981c31e..9a0dab6 100644 --- a/app/views/games/show.json.jbuilder +++ b/app/views/games/show.json.jbuilder @@ -1 +1 @@ -json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method, :created_at, :updated_at +json.extract! @game, :id, :parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method, :created_at, :updated_at diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb index a5eba7a..38f01ee 100644 --- a/app/views/tournaments/_form.html.erb +++ b/app/views/tournaments/_form.html.erb @@ -57,12 +57,6 @@ <%= f.label :scoring_method %> <%= f.select(:scoring_method, @tournament.scoring_methods.map{|method| [method.humanize.titleize, method]}) %> </p> - - <p> - <%= f.label :sampling_method %> - <%= f.select(:sampling_method, @tournament.sampling_methods.map{|method| [method.humanize, method]}) %> - </p> - </fieldset> <fieldset> diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder index c6b9e68..f92397f 100644 --- a/app/views/tournaments/index.json.jbuilder +++ b/app/views/tournaments/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@tournaments) do |tournament| - json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method + json.extract! tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method json.url tournament_url(tournament, format: :json) end diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb index c71d3c6..ec83dc0 100644 --- a/app/views/tournaments/show.html.erb +++ b/app/views/tournaments/show.html.erb @@ -46,8 +46,8 @@ </p> <p> - <strong>Sampling method:</strong> - <%= @tournament.sampling_method.humanize.capitalize %> + <strong>Scoring method:</strong> + <%= @tournament.scoring_method.titleize %> </p> <% @tournament.settings.each do |setting| %> diff --git a/app/views/tournaments/show.json.jbuilder b/app/views/tournaments/show.json.jbuilder index afc5814..888c6b2 100644 --- a/app/views/tournaments/show.json.jbuilder +++ b/app/views/tournaments/show.json.jbuilder @@ -1 +1 @@ -json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method, :created_at, :updated_at +json.extract! @tournament, :id, :game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :scoring_method, :created_at, :updated_at diff --git a/db/migrate/20140427131527_create_simple_captcha_data.rb b/db/migrate/20140428092839_create_simple_captcha_data.rb index 4573b20..4573b20 100644 --- a/db/migrate/20140427131527_create_simple_captcha_data.rb +++ b/db/migrate/20140428092839_create_simple_captcha_data.rb diff --git a/db/migrate/20140427171523_create_mailboxer.mailboxer_engine.rb b/db/migrate/20140428132832_create_mailboxer.mailboxer_engine.rb index 690cec2..690cec2 100644 --- a/db/migrate/20140427171523_create_mailboxer.mailboxer_engine.rb +++ b/db/migrate/20140428132832_create_mailboxer.mailboxer_engine.rb diff --git a/db/migrate/20140427171524_add_notified_object.mailboxer_engine.rb b/db/migrate/20140428132833_add_notified_object.mailboxer_engine.rb index 7f41ac6..7f41ac6 100644 --- a/db/migrate/20140427171524_add_notified_object.mailboxer_engine.rb +++ b/db/migrate/20140428132833_add_notified_object.mailboxer_engine.rb diff --git a/db/migrate/20140427171525_add_notification_code.mailboxer_engine.rb b/db/migrate/20140428132834_add_notification_code.mailboxer_engine.rb index 04c12ef..04c12ef 100644 --- a/db/migrate/20140427171525_add_notification_code.mailboxer_engine.rb +++ b/db/migrate/20140428132834_add_notification_code.mailboxer_engine.rb diff --git a/db/migrate/20140427171526_add_attachments.mailboxer_engine.rb b/db/migrate/20140428132835_add_attachments.mailboxer_engine.rb index b8d6588..b8d6588 100644 --- a/db/migrate/20140427171526_add_attachments.mailboxer_engine.rb +++ b/db/migrate/20140428132835_add_attachments.mailboxer_engine.rb diff --git a/db/migrate/20140427171527_rename_receipts_read.mailboxer_engine.rb b/db/migrate/20140428132836_rename_receipts_read.mailboxer_engine.rb index 9ce904f..9ce904f 100644 --- a/db/migrate/20140427171527_rename_receipts_read.mailboxer_engine.rb +++ b/db/migrate/20140428132836_rename_receipts_read.mailboxer_engine.rb diff --git a/db/migrate/20140427171528_add_global_notification_support.mailboxer_engine.rb b/db/migrate/20140428132837_add_global_notification_support.mailboxer_engine.rb index 60f67ab..60f67ab 100644 --- a/db/migrate/20140427171528_add_global_notification_support.mailboxer_engine.rb +++ b/db/migrate/20140428132837_add_global_notification_support.mailboxer_engine.rb diff --git a/db/migrate/20140427171530_create_delayed_jobs.rb b/db/migrate/20140428132845_create_delayed_jobs.rb index ec0dd93..ec0dd93 100644 --- a/db/migrate/20140427171530_create_delayed_jobs.rb +++ b/db/migrate/20140428132845_create_delayed_jobs.rb diff --git a/db/migrate/20140427171533_create_servers.rb b/db/migrate/20140428132852_create_servers.rb index fbe1b02..fbe1b02 100644 --- a/db/migrate/20140427171533_create_servers.rb +++ b/db/migrate/20140428132852_create_servers.rb diff --git a/db/migrate/20140427171537_create_matches.rb b/db/migrate/20140428132900_create_matches.rb index bac92d1..bac92d1 100644 --- a/db/migrate/20140427171537_create_matches.rb +++ b/db/migrate/20140428132900_create_matches.rb diff --git a/db/migrate/20140427171541_create_teams.rb b/db/migrate/20140428132907_create_teams.rb index dd8397d..dd8397d 100644 --- a/db/migrate/20140427171541_create_teams.rb +++ b/db/migrate/20140428132907_create_teams.rb diff --git a/db/migrate/20140427171545_create_alerts.rb b/db/migrate/20140428132914_create_alerts.rb index 68a8e10..68a8e10 100644 --- a/db/migrate/20140427171545_create_alerts.rb +++ b/db/migrate/20140428132914_create_alerts.rb diff --git a/db/migrate/20140427171548_create_pms.rb b/db/migrate/20140428132922_create_pms.rb index eb9f443..eb9f443 100644 --- a/db/migrate/20140427171548_create_pms.rb +++ b/db/migrate/20140428132922_create_pms.rb diff --git a/db/migrate/20140427171552_create_tournaments.rb b/db/migrate/20140428132929_create_tournaments.rb index 8dae8f6..f3715bb 100644 --- a/db/migrate/20140427171552_create_tournaments.rb +++ b/db/migrate/20140428132929_create_tournaments.rb @@ -8,7 +8,6 @@ class CreateTournaments < ActiveRecord::Migration t.integer :max_players_per_team t.integer :min_teams_per_match t.integer :max_teams_per_match - t.string :sampling_method t.string :scoring_method t.timestamps diff --git a/db/migrate/20140427171556_create_games.rb b/db/migrate/20140428132937_create_games.rb index d1b9511..e841667 100644 --- a/db/migrate/20140427171556_create_games.rb +++ b/db/migrate/20140428132937_create_games.rb @@ -7,7 +7,6 @@ class CreateGames < ActiveRecord::Migration t.integer :max_players_per_team t.integer :min_teams_per_match t.integer :max_teams_per_match - t.string :sampling_method t.string :scoring_method t.timestamps diff --git a/db/migrate/20140427171600_create_users.rb b/db/migrate/20140428132944_create_users.rb index 8032870..8032870 100644 --- a/db/migrate/20140427171600_create_users.rb +++ b/db/migrate/20140428132944_create_users.rb diff --git a/db/migrate/20140427171603_create_sessions.rb b/db/migrate/20140428132951_create_sessions.rb index f667f1e..f667f1e 100644 --- a/db/migrate/20140427171603_create_sessions.rb +++ b/db/migrate/20140428132951_create_sessions.rb diff --git a/db/migrate/20140427171607_create_brackets.rb b/db/migrate/20140428132958_create_brackets.rb index 8813bf2..8813bf2 100644 --- a/db/migrate/20140427171607_create_brackets.rb +++ b/db/migrate/20140428132958_create_brackets.rb diff --git a/db/migrate/20140427171611_create_game_settings.rb b/db/migrate/20140428133006_create_game_settings.rb index 06fb72e..06fb72e 100644 --- a/db/migrate/20140427171611_create_game_settings.rb +++ b/db/migrate/20140428133006_create_game_settings.rb diff --git a/db/migrate/20140427171615_create_tournament_settings.rb b/db/migrate/20140428133013_create_tournament_settings.rb index e56697f..e56697f 100644 --- a/db/migrate/20140427171615_create_tournament_settings.rb +++ b/db/migrate/20140428133013_create_tournament_settings.rb diff --git a/db/migrate/20140427171618_create_tournament_stages.rb b/db/migrate/20140428133020_create_tournament_stages.rb index 6e52bf0..6e52bf0 100644 --- a/db/migrate/20140427171618_create_tournament_stages.rb +++ b/db/migrate/20140428133020_create_tournament_stages.rb diff --git a/db/migrate/20140427171622_create_statistics.rb b/db/migrate/20140428133026_create_statistics.rb index cc2e97d..cc2e97d 100644 --- a/db/migrate/20140427171622_create_statistics.rb +++ b/db/migrate/20140428133026_create_statistics.rb diff --git a/db/migrate/20140427171626_create_remote_usernames.rb b/db/migrate/20140428133033_create_remote_usernames.rb index e265985..e265985 100644 --- a/db/migrate/20140427171626_create_remote_usernames.rb +++ b/db/migrate/20140428133033_create_remote_usernames.rb diff --git a/db/migrate/20140427171629_create_bracket_matches.rb b/db/migrate/20140428133041_create_bracket_matches.rb index 3323e31..3323e31 100644 --- a/db/migrate/20140427171629_create_bracket_matches.rb +++ b/db/migrate/20140428133041_create_bracket_matches.rb diff --git a/db/migrate/20140427171633_create_api_requests.rb b/db/migrate/20140428133048_create_api_requests.rb index 544c330..544c330 100644 --- a/db/migrate/20140427171633_create_api_requests.rb +++ b/db/migrate/20140428133048_create_api_requests.rb diff --git a/db/migrate/20140427171637_create_tournament_players_join_table.rb b/db/migrate/20140428133055_create_tournament_players_join_table.rb index be240e8..be240e8 100644 --- a/db/migrate/20140427171637_create_tournament_players_join_table.rb +++ b/db/migrate/20140428133055_create_tournament_players_join_table.rb diff --git a/db/migrate/20140427171640_create_tournament_hosts_join_table.rb b/db/migrate/20140428133102_create_tournament_hosts_join_table.rb index 7521d89..7521d89 100644 --- a/db/migrate/20140427171640_create_tournament_hosts_join_table.rb +++ b/db/migrate/20140428133102_create_tournament_hosts_join_table.rb diff --git a/db/migrate/20140427171644_create_team_user_join_table.rb b/db/migrate/20140428133109_create_team_user_join_table.rb index f3b57fc..f3b57fc 100644 --- a/db/migrate/20140427171644_create_team_user_join_table.rb +++ b/db/migrate/20140428133109_create_team_user_join_table.rb diff --git a/db/migrate/20140427171647_create_match_team_join_table.rb b/db/migrate/20140428133116_create_match_team_join_table.rb index c2ed1b7..c2ed1b7 100644 --- a/db/migrate/20140427171647_create_match_team_join_table.rb +++ b/db/migrate/20140428133116_create_match_team_join_table.rb diff --git a/db/migrate/20140427171658_add_hidden_attrs_to_user.rb b/db/migrate/20140428133136_add_hidden_attrs_to_user.rb index 9b5c505..9b5c505 100644 --- a/db/migrate/20140427171658_add_hidden_attrs_to_user.rb +++ b/db/migrate/20140428133136_add_hidden_attrs_to_user.rb diff --git a/db/schema.rb b/db/schema.rb index b3284b9..a7910eb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140427171658) do +ActiveRecord::Schema.define(version: 20140428133136) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -94,7 +94,6 @@ ActiveRecord::Schema.define(version: 20140427171658) do t.integer "max_players_per_team" t.integer "min_teams_per_match" t.integer "max_teams_per_match" - t.string "sampling_method" t.string "scoring_method" t.datetime "created_at" t.datetime "updated_at" @@ -270,7 +269,6 @@ ActiveRecord::Schema.define(version: 20140427171658) do t.integer "max_players_per_team" t.integer "min_teams_per_match" t.integer "max_teams_per_match" - t.string "sampling_method" t.string "scoring_method" t.datetime "created_at" t.datetime "updated_at" diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb index b86fe7a..1a457ba 100644 --- a/test/controllers/games_controller_test.rb +++ b/test/controllers/games_controller_test.rb @@ -18,7 +18,7 @@ class GamesControllerTest < ActionController::TestCase test "should create game" do assert_difference('Game.count') do - post :create, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method } + post :create, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, scoring_method: @game.scoring_method } end assert_redirected_to game_path(assigns(:game)) @@ -35,7 +35,7 @@ class GamesControllerTest < ActionController::TestCase end test "should update game" do - patch :update, id: @game, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method } + patch :update, id: @game, game: { max_players_per_team: @game.max_players_per_team, max_teams_per_match: @game.max_teams_per_match, min_players_per_team: @game.min_players_per_team, min_teams_per_match: @game.min_teams_per_match, name: @game.name, parent_id: @game.parent_id, scoring_method: @game.scoring_method } assert_redirected_to game_path(assigns(:game)) end diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb index 5639150..7ef5590 100644 --- a/test/controllers/tournaments_controller_test.rb +++ b/test/controllers/tournaments_controller_test.rb @@ -18,7 +18,7 @@ class TournamentsControllerTest < ActionController::TestCase test "should create tournament" do assert_difference('Tournament.count') do - post :create, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, status: @tournament.status } + post :create, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, scoring_method: @tournament.scoring_method, status: @tournament.status } end assert_redirected_to tournament_path(assigns(:tournament)) @@ -35,7 +35,7 @@ class TournamentsControllerTest < ActionController::TestCase end test "should update tournament" do - patch :update, id: @tournament, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, status: @tournament.status } + patch :update, id: @tournament, tournament: { game_id: @tournament.game_id, max_players_per_team: @tournament.max_players_per_team, max_teams_per_match: @tournament.max_teams_per_match, min_players_per_team: @tournament.min_players_per_team, min_teams_per_match: @tournament.min_teams_per_match, name: @tournament.name, scoring_method: @tournament.scoring_method, status: @tournament.status } assert_redirected_to tournament_path(assigns(:tournament)) end diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml index f6d8a2e..bdb9cb5 100644 --- a/test/fixtures/games.yml +++ b/test/fixtures/games.yml @@ -7,7 +7,6 @@ one: max_players_per_team: 1 min_teams_per_match: 1 max_teams_per_match: 1 - sampling_method: MyString scoring_method: MyString two: @@ -17,5 +16,4 @@ two: max_players_per_team: 1 min_teams_per_match: 1 max_teams_per_match: 1 - sampling_method: MyString scoring_method: MyString diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml index d975b1d..4691b8a 100644 --- a/test/fixtures/tournaments.yml +++ b/test/fixtures/tournaments.yml @@ -8,7 +8,6 @@ one: max_players_per_team: 1 min_teams_per_match: 1 max_teams_per_match: 1 - sampling_method: MyString scoring_method: MyString two: @@ -19,5 +18,4 @@ two: max_players_per_team: 1 min_teams_per_match: 1 max_teams_per_match: 1 - sampling_method: MyString scoring_method: MyString |