diff options
Diffstat (limited to 'test')
-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/tournament_stages.yml | 6 | ||||
-rw-r--r-- | test/fixtures/tournaments.yml | 2 |
5 files changed, 12 insertions, 6 deletions
diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb index be97aa0..567ecb9 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, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, set_rounds: @game.set_rounds } + 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, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method, set_rounds: @game.set_rounds } 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, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, set_rounds: @game.set_rounds } + 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, randomized_teams: @game.randomized_teams, sampling_method: @game.sampling_method, scoring_method: @game.scoring_method, set_rounds: @game.set_rounds } 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 0e5673c..0ee875a 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, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, set_rounds: @tournament.set_rounds, 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, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, set_rounds: @tournament.set_rounds, 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, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, set_rounds: @tournament.set_rounds, 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, randomized_teams: @tournament.randomized_teams, sampling_method: @tournament.sampling_method, scoring_method: @tournament.scoring_method, set_rounds: @tournament.set_rounds, status: @tournament.status } assert_redirected_to tournament_path(assigns(:tournament)) end diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml index b811dec..ac5bad8 100644 --- a/test/fixtures/games.yml +++ b/test/fixtures/games.yml @@ -10,6 +10,7 @@ one: set_rounds: 1 randomized_teams: false sampling_method: MyString + scoring_method: MyString two: parent_id: @@ -21,3 +22,4 @@ two: set_rounds: 1 randomized_teams: false sampling_method: MyString + scoring_method: MyString diff --git a/test/fixtures/tournament_stages.yml b/test/fixtures/tournament_stages.yml index fdb263c..32eaba3 100644 --- a/test/fixtures/tournament_stages.yml +++ b/test/fixtures/tournament_stages.yml @@ -2,10 +2,12 @@ one: tournament_id: - scheduling: MyString structure: MyText + scheduling_method: MyString + seeding_method: MyString two: tournament_id: - scheduling: MyString structure: MyText + scheduling_method: MyString + seeding_method: MyString diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml index 714a963..dd9b56d 100644 --- a/test/fixtures/tournaments.yml +++ b/test/fixtures/tournaments.yml @@ -11,6 +11,7 @@ one: set_rounds: 1 randomized_teams: false sampling_method: MyString + scoring_method: MyString two: game_id: @@ -23,3 +24,4 @@ two: set_rounds: 1 randomized_teams: false sampling_method: MyString + scoring_method: MyString |