summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-02-27 17:41:59 -0500
committerAndrewMurrell <amurrel@purdue.edu>2014-02-27 17:41:59 -0500
commitf3f17dcd9755020276062caae7c0677eff88cb2f (patch)
tree36018148c3335f708269075f41c8892a62d0c85b /test
parentde40ec53e8b80d8d880214183f19ea93172a0026 (diff)
Added the Games Attributes stuff.
Diffstat (limited to 'test')
-rw-r--r--test/controllers/games_controller_test.rb4
-rw-r--r--test/fixtures/games.yml8
2 files changed, 10 insertions, 2 deletions
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