diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-22 15:56:06 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-22 15:56:06 -0400 |
commit | 45c5d311492ef98ed702beaf043d289a705a5e0b (patch) | |
tree | c0bea2e65d21127a1fd34a245b5bb7fc47123bb0 /test | |
parent | 9d226fcd27b6c2470edf718ad36a262348891470 (diff) | |
parent | c927cd7c043d982f8ffb51c8a78288d88d825d82 (diff) |
Merge branch 'clean2'
Conflicts:
app/models/team.rb
app/views/matches/index.html.erb
app/views/matches/show.html.erb
Diffstat (limited to 'test')
-rw-r--r-- | test/controllers/matches_controller_test.rb | 4 | ||||
-rw-r--r-- | test/controllers/teams_controller_test.rb | 4 | ||||
-rw-r--r-- | test/fixtures/matches.yml | 6 | ||||
-rw-r--r-- | test/fixtures/teams.yml | 14 |
4 files changed, 15 insertions, 13 deletions
diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb index 033704e..d4ac1ed 100644 --- a/test/controllers/matches_controller_test.rb +++ b/test/controllers/matches_controller_test.rb @@ -18,7 +18,7 @@ class MatchesControllerTest < ActionController::TestCase test "should create match" do assert_difference('Match.count') do - post :create, match: { name: @match.name, remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } + post :create, match: { remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } end assert_redirected_to match_path(assigns(:match)) @@ -35,7 +35,7 @@ class MatchesControllerTest < ActionController::TestCase end test "should update match" do - patch :update, id: @match, match: { name: @match.name, remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } + patch :update, id: @match, match: { remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } assert_redirected_to match_path(assigns(:match)) end diff --git a/test/controllers/teams_controller_test.rb b/test/controllers/teams_controller_test.rb index 52f7c17..8bf60be 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: { match_id: @team.match_id } + post :create, team: { } 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: { match_id: @team.match_id } + patch :update, id: @team, team: { } assert_redirected_to team_path(assigns(:team)) end diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml index ff81182..4213238 100644 --- a/test/fixtures/matches.yml +++ b/test/fixtures/matches.yml @@ -3,15 +3,13 @@ one: status: 1 tournament_stage_id: - name: MyString winner_id: - remote_id: MyString + remote_id: MyText submitted_peer_evaluations: 1 two: status: 1 tournament_stage_id: - name: MyString winner_id: - remote_id: MyString + remote_id: MyText submitted_peer_evaluations: 1 diff --git a/test/fixtures/teams.yml b/test/fixtures/teams.yml index 4efc76e..937a0c0 100644 --- a/test/fixtures/teams.yml +++ b/test/fixtures/teams.yml @@ -1,7 +1,11 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html -one: - match_id: - -two: - match_id: +# 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 |