diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-04-23 21:47:34 -0400 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-04-23 21:47:34 -0400 |
commit | 8003c0f8326f231b6e0c8bb29feb48736271ea21 (patch) | |
tree | ec0fcef385cac365f6a0f2c3f348ef8a3d65d090 /test | |
parent | 8010bd28db76dd5783b2be046de4c63fa27738f6 (diff) | |
parent | cfa41fcc58acc9ae50b84eb51e3d9fa9ecb3b79e (diff) |
Merge branch 'clean2'
Conflicts:
app/models/game.rb
Diffstat (limited to 'test')
-rw-r--r-- | test/controllers/games_controller_test.rb | 4 | ||||
-rw-r--r-- | test/fixtures/game_settings.yml | 2 | ||||
-rw-r--r-- | test/fixtures/games.yml | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb index f55a226..be97aa0 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, 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, 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, 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, set_rounds: @game.set_rounds } assert_redirected_to game_path(assigns(:game)) end diff --git a/test/fixtures/game_settings.yml b/test/fixtures/game_settings.yml index 37ec91d..118501b 100644 --- a/test/fixtures/game_settings.yml +++ b/test/fixtures/game_settings.yml @@ -8,7 +8,6 @@ one: description: MyText display_order: 1 default: MyText - parent_id: two: game_id: @@ -18,4 +17,3 @@ two: description: MyText display_order: 1 default: MyText - parent_id: diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml index af46a13..b811dec 100644 --- a/test/fixtures/games.yml +++ b/test/fixtures/games.yml @@ -1,6 +1,7 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: + parent_id: name: MyString min_players_per_team: 1 max_players_per_team: 1 @@ -11,6 +12,7 @@ one: sampling_method: MyString two: + parent_id: name: MyString min_players_per_team: 1 max_players_per_team: 1 |