diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-27 17:02:10 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-27 17:02:10 -0500 |
commit | de40ec53e8b80d8d880214183f19ea93172a0026 (patch) | |
tree | cb25d099fa0252d2b43db850f21c69ccd03907e3 /test | |
parent | 3a7b14f4a51c0fdb8b71720f361a0a8ccf080325 (diff) |
give tournaments a game type
Diffstat (limited to 'test')
-rw-r--r-- | test/controllers/tournaments_controller_test.rb | 4 | ||||
-rw-r--r-- | test/fixtures/tournaments.yml | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb index 9363bdf..bdbbfac 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: { } + post :create, tournament: { game_id: @tournament.game_id } 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: { } + patch :update, id: @tournament, tournament: { game_id: @tournament.game_id } assert_redirected_to tournament_path(assigns(:tournament)) end diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml index 937a0c0..4cba7ca 100644 --- a/test/fixtures/tournaments.yml +++ b/test/fixtures/tournaments.yml @@ -1,11 +1,7 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -# This model initially had no columns defined. If you add columns to the -# model remove the '{}' from the fixture names and add the columns immediately -# below each fixture, per the syntax in the comments below -# -one: {} -# column: value -# -two: {} -# column: value +one: + game_id: + +two: + game_id: |