summaryrefslogtreecommitdiff
path: root/test/controllers
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-03-06 17:25:40 -0500
committerguntasgrewal <guntasgrewal@gmail.com>2014-03-06 17:25:40 -0500
commitf5d36fc67d1994b7cc1ce02e7be2767ffcb47857 (patch)
tree03afe3bea27d2963525d7509690ec6b39e5648f9 /test/controllers
parentd0545c2820d101a98b3c895cf6e3691145a62f3c (diff)
new generate
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/games_controller_test.rb4
-rw-r--r--test/controllers/teams_controller_test.rb4
-rw-r--r--test/controllers/tournaments_controller_test.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/controllers/games_controller_test.rb b/test/controllers/games_controller_test.rb
index 95c3145..b93feac 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, players_per_team: @game.players_per_team, randomized_teams: @game.randomized_teams, set_rounds: @game.set_rounds, teams_per_match: @game.teams_per_match }
+ 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, 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: { 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 }
+ 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, set_rounds: @game.set_rounds }
assert_redirected_to game_path(assigns(:game))
end
diff --git a/test/controllers/teams_controller_test.rb b/test/controllers/teams_controller_test.rb
index 8bf60be..52f7c17 100644
--- a/test/controllers/teams_controller_test.rb
+++ b/test/controllers/teams_controller_test.rb
@@ -18,7 +18,7 @@ class TeamsControllerTest < ActionController::TestCase
test "should create team" do
assert_difference('Team.count') do
- post :create, team: { }
+ post :create, team: { match_id: @team.match_id }
end
assert_redirected_to team_path(assigns(:team))
@@ -35,7 +35,7 @@ class TeamsControllerTest < ActionController::TestCase
end
test "should update team" do
- patch :update, id: @team, team: { }
+ patch :update, id: @team, team: { match_id: @team.match_id }
assert_redirected_to team_path(assigns(:team))
end
diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb
index bdbbfac..02e578a 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 }
+ 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, randomized_teams: @tournament.randomized_teams, 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 }
+ 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, randomized_teams: @tournament.randomized_teams, set_rounds: @tournament.set_rounds, status: @tournament.status }
assert_redirected_to tournament_path(assigns(:tournament))
end