From ecef4973baed5580e3b2500ce0a65def1132d172 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Tue, 25 Mar 2014 16:12:18 -0400 Subject: Changes to generate.sh --- test/fixtures/game_options.yml | 11 ----------- test/fixtures/game_settings.yml | 19 +++++++++++++++++++ test/models/game_option_test.rb | 7 ------- test/models/game_setting_test.rb | 7 +++++++ 4 files changed, 26 insertions(+), 18 deletions(-) delete mode 100644 test/fixtures/game_options.yml create mode 100644 test/fixtures/game_settings.yml delete mode 100644 test/models/game_option_test.rb create mode 100644 test/models/game_setting_test.rb (limited to 'test') diff --git a/test/fixtures/game_options.yml b/test/fixtures/game_options.yml deleted file mode 100644 index eb4760a..0000000 --- a/test/fixtures/game_options.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html - -one: - vartype: 1 - name: MyString - default: MyText - -two: - vartype: 1 - name: MyString - default: MyText diff --git a/test/fixtures/game_settings.yml b/test/fixtures/game_settings.yml new file mode 100644 index 0000000..5626c97 --- /dev/null +++ b/test/fixtures/game_settings.yml @@ -0,0 +1,19 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + game_id: + type: 1 + name: MyString + default: MyText + discription: MyText + type_opt: MyText + display_order: 1 + +two: + game_id: + type: 1 + name: MyString + default: MyText + discription: MyText + type_opt: MyText + display_order: 1 diff --git a/test/models/game_option_test.rb b/test/models/game_option_test.rb deleted file mode 100644 index 1ae5701..0000000 --- a/test/models/game_option_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class GameOptionTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end -end diff --git a/test/models/game_setting_test.rb b/test/models/game_setting_test.rb new file mode 100644 index 0000000..8ab8bcf --- /dev/null +++ b/test/models/game_setting_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class GameSettingTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end -- cgit v1.2.3-2-g168b From 4e754e04d6bd04267e5a55011aa9f4f2a2fc7859 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Tue, 25 Mar 2014 16:30:13 -0400 Subject: Tournament has a NAME now --- test/controllers/tournaments_controller_test.rb | 4 ++-- test/fixtures/tournaments.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb index 02e578a..d5ab2af 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, randomized_teams: @tournament.randomized_teams, set_rounds: @tournament.set_rounds, status: @tournament.status } + 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 } 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, randomized_teams: @tournament.randomized_teams, set_rounds: @tournament.set_rounds, status: @tournament.status } + 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 } assert_redirected_to tournament_path(assigns(:tournament)) end diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml index 27c92f9..89edc9f 100644 --- a/test/fixtures/tournaments.yml +++ b/test/fixtures/tournaments.yml @@ -1,6 +1,7 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: + name: MyString game_id: status: 1 min_players_per_team: 1 @@ -11,6 +12,7 @@ one: randomized_teams: false two: + name: MyString game_id: status: 1 min_players_per_team: 1 -- cgit v1.2.3-2-g168b From 433fc302fe2943e89a36657affea39d578475d20 Mon Sep 17 00:00:00 2001 From: guntasgrewal Date: Tue, 25 Mar 2014 17:47:32 -0400 Subject: Match Status added --- test/controllers/matches_controller_test.rb | 4 ++-- test/fixtures/matches.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb index 51b7f37..c3cc7a4 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, tournament_id: @match.tournament_id, winner_id: @match.winner_id } + post :create, match: { name: @match.name, 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, tournament_id: @match.tournament_id, winner_id: @match.winner_id } + patch :update, id: @match, match: { name: @match.name, 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/fixtures/matches.yml b/test/fixtures/matches.yml index 956229c..00af9f5 100644 --- a/test/fixtures/matches.yml +++ b/test/fixtures/matches.yml @@ -1,11 +1,13 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: + status: 1 tournament_id: name: MyString winner_id: two: + status: 1 tournament_id: name: MyString winner_id: -- cgit v1.2.3-2-g168b