summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-01 17:07:46 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-01 17:07:46 -0400
commit0f2b05889cba090e4824f62965ee8d131da09973 (patch)
tree88377b4f94cca6106170ef965b0cea00da3760f8 /test
parent433fc302fe2943e89a36657affea39d578475d20 (diff)
Re-ran generate.
Diffstat (limited to 'test')
-rw-r--r--test/controllers/matches_controller_test.rb4
-rw-r--r--test/controllers/tournaments_controller_test.rb4
-rw-r--r--test/fixtures/matches.yml2
-rw-r--r--test/fixtures/remote_usernames.yml11
-rw-r--r--test/fixtures/tournament_preferences.yml (renamed from test/fixtures/tournament_options.yml)0
-rw-r--r--test/fixtures/tournaments.yml12
-rw-r--r--test/models/remote_username_test.rb (renamed from test/models/server_settings_test.rb)2
-rw-r--r--test/models/server_setting_test.rb (renamed from test/models/tournament_option_test.rb)2
-rw-r--r--test/models/tournament_preference_test.rb7
9 files changed, 28 insertions, 16 deletions
diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb
index c3cc7a4..8782b2c 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, status: @match.status, tournament_id: @match.tournament_id, winner_id: @match.winner_id }
+ post :create, match: { name: @match.name, remote_id: @match.remote_id, status: @match.status, tournament_id: @match.tournament_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, status: @match.status, tournament_id: @match.tournament_id, winner_id: @match.winner_id }
+ patch :update, id: @match, match: { name: @match.name, remote_id: @match.remote_id, status: @match.status, tournament_id: @match.tournament_id, winner_id: @match.winner_id }
assert_redirected_to match_path(assigns(:match))
end
diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb
index d5ab2af..775288c 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, 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, name: @tournament.name, randomized_teams: @tournament.randomized_teams, set_rounds: @tournament.set_rounds, status: @tournament.status }
+ post :create, tournament: { game_id: @tournament.game_id, ger: @tournament.ger, name: @tournament.name, randomized_teams: @tournament.randomized_teams, 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, 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, name: @tournament.name, randomized_teams: @tournament.randomized_teams, set_rounds: @tournament.set_rounds, status: @tournament.status }
+ patch :update, id: @tournament, tournament: { game_id: @tournament.game_id, ger: @tournament.ger, name: @tournament.name, randomized_teams: @tournament.randomized_teams, status: @tournament.status }
assert_redirected_to tournament_path(assigns(:tournament))
end
diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml
index 00af9f5..8e86062 100644
--- a/test/fixtures/matches.yml
+++ b/test/fixtures/matches.yml
@@ -5,9 +5,11 @@ one:
tournament_id:
name: MyString
winner_id:
+ remote_id: MyString
two:
status: 1
tournament_id:
name: MyString
winner_id:
+ remote_id: MyString
diff --git a/test/fixtures/remote_usernames.yml b/test/fixtures/remote_usernames.yml
new file mode 100644
index 0000000..baa1714
--- /dev/null
+++ b/test/fixtures/remote_usernames.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+one:
+ game_id:
+ user_id:
+ json_value: MyText
+
+two:
+ game_id:
+ user_id:
+ json_value: MyText
diff --git a/test/fixtures/tournament_options.yml b/test/fixtures/tournament_preferences.yml
index aa5eaef..aa5eaef 100644
--- a/test/fixtures/tournament_options.yml
+++ b/test/fixtures/tournament_preferences.yml
diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml
index 89edc9f..25bb065 100644
--- a/test/fixtures/tournaments.yml
+++ b/test/fixtures/tournaments.yml
@@ -4,20 +4,12 @@ one:
name: MyString
game_id:
status: 1
- min_players_per_team: 1
- max_players_per_team: 1
- min_teams_per_match: 1
- max_teams_per_match: 1
- set_rounds: 1
+ ger: MyString
randomized_teams: false
two:
name: MyString
game_id:
status: 1
- min_players_per_team: 1
- max_players_per_team: 1
- min_teams_per_match: 1
- max_teams_per_match: 1
- set_rounds: 1
+ ger: MyString
randomized_teams: false
diff --git a/test/models/server_settings_test.rb b/test/models/remote_username_test.rb
index 470b316..3321b6c 100644
--- a/test/models/server_settings_test.rb
+++ b/test/models/remote_username_test.rb
@@ -1,6 +1,6 @@
require 'test_helper'
-class ServerSettingsTest < ActiveSupport::TestCase
+class RemoteUsernameTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
diff --git a/test/models/tournament_option_test.rb b/test/models/server_setting_test.rb
index 8fa9628..eee32c1 100644
--- a/test/models/tournament_option_test.rb
+++ b/test/models/server_setting_test.rb
@@ -1,6 +1,6 @@
require 'test_helper'
-class TournamentOptionTest < ActiveSupport::TestCase
+class ServerSettingTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
diff --git a/test/models/tournament_preference_test.rb b/test/models/tournament_preference_test.rb
new file mode 100644
index 0000000..e200b8e
--- /dev/null
+++ b/test/models/tournament_preference_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TournamentPreferenceTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end