From f3f17dcd9755020276062caae7c0677eff88cb2f Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Thu, 27 Feb 2014 17:41:59 -0500 Subject: Added the Games Attributes stuff. --- test/controllers/games_controller_test.rb | 4 ++-- test/fixtures/games.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb index 420758e..95c3145 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: { name: @game.name } + post :create, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match } 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: { name: @game.name } + patch :update, id: @game, game: { name: @game.name, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match } assert_redirected_to game_path(assigns(:game)) end diff --git a/test/fixtures/games.yml b/test/fixtures/games.yml index ce6f466..3068527 100644 --- a/test/fixtures/games.yml +++ b/test/fixtures/games.yml @@ -2,6 +2,14 @@ one: name: MyText + players_per_team: 1 + teams_per_match: 1 + set_rounds: 1 + randomized_teams: 1 two: name: MyText + players_per_team: 1 + teams_per_match: 1 + set_rounds: 1 + randomized_teams: 1 -- cgit v1.2.3