From 0f2b05889cba090e4824f62965ee8d131da09973 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 1 Apr 2014 17:07:46 -0400 Subject: Re-ran generate. --- test/controllers/matches_controller_test.rb | 4 ++-- test/controllers/tournaments_controller_test.rb | 4 ++-- test/fixtures/matches.yml | 2 ++ test/fixtures/remote_usernames.yml | 11 +++++++++++ test/fixtures/tournament_options.yml | 13 ------------- test/fixtures/tournament_preferences.yml | 13 +++++++++++++ test/fixtures/tournaments.yml | 12 ++---------- test/models/remote_username_test.rb | 7 +++++++ test/models/server_setting_test.rb | 7 +++++++ test/models/server_settings_test.rb | 7 ------- test/models/tournament_option_test.rb | 7 ------- test/models/tournament_preference_test.rb | 7 +++++++ 12 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 test/fixtures/remote_usernames.yml delete mode 100644 test/fixtures/tournament_options.yml create mode 100644 test/fixtures/tournament_preferences.yml create mode 100644 test/models/remote_username_test.rb create mode 100644 test/models/server_setting_test.rb delete mode 100644 test/models/server_settings_test.rb delete mode 100644 test/models/tournament_option_test.rb create mode 100644 test/models/tournament_preference_test.rb (limited to 'test') 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_options.yml deleted file mode 100644 index aa5eaef..0000000 --- a/test/fixtures/tournament_options.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - tournament_id: - vartype: 1 - name: MyString - value: MyText - -two: - tournament_id: - vartype: 1 - name: MyString - value: MyText diff --git a/test/fixtures/tournament_preferences.yml b/test/fixtures/tournament_preferences.yml new file mode 100644 index 0000000..aa5eaef --- /dev/null +++ b/test/fixtures/tournament_preferences.yml @@ -0,0 +1,13 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + tournament_id: + vartype: 1 + name: MyString + value: MyText + +two: + tournament_id: + vartype: 1 + name: MyString + value: MyText 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/remote_username_test.rb b/test/models/remote_username_test.rb new file mode 100644 index 0000000..3321b6c --- /dev/null +++ b/test/models/remote_username_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class RemoteUsernameTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/server_setting_test.rb b/test/models/server_setting_test.rb new file mode 100644 index 0000000..eee32c1 --- /dev/null +++ b/test/models/server_setting_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ServerSettingTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/server_settings_test.rb b/test/models/server_settings_test.rb deleted file mode 100644 index 470b316..0000000 --- a/test/models/server_settings_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class ServerSettingsTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/tournament_option_test.rb b/test/models/tournament_option_test.rb deleted file mode 100644 index 8fa9628..0000000 --- a/test/models/tournament_option_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class TournamentOptionTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -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 -- cgit v1.2.3