From 94a5654371812905c154f29cef393d42f13c5eaa Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 18 Feb 2014 18:16:28 -0500 Subject: Added the generate shell command. Please do not commit the generated files. --- test/controllers/tournaments_controller_test.rb | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/controllers/tournaments_controller_test.rb (limited to 'test/controllers/tournaments_controller_test.rb') diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb new file mode 100644 index 0000000..9363bdf --- /dev/null +++ b/test/controllers/tournaments_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class TournamentsControllerTest < ActionController::TestCase + setup do + @tournament = tournaments(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:tournaments) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create tournament" do + assert_difference('Tournament.count') do + post :create, tournament: { } + end + + assert_redirected_to tournament_path(assigns(:tournament)) + end + + test "should show tournament" do + get :show, id: @tournament + assert_response :success + end + + test "should get edit" do + get :edit, id: @tournament + assert_response :success + end + + test "should update tournament" do + patch :update, id: @tournament, tournament: { } + assert_redirected_to tournament_path(assigns(:tournament)) + end + + test "should destroy tournament" do + assert_difference('Tournament.count', -1) do + delete :destroy, id: @tournament + end + + assert_redirected_to tournaments_path + end +end -- cgit v1.2.3-2-g168b From de40ec53e8b80d8d880214183f19ea93172a0026 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 27 Feb 2014 17:02:10 -0500 Subject: give tournaments a game type --- test/controllers/tournaments_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/controllers/tournaments_controller_test.rb') 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 -- cgit v1.2.3-2-g168b From 11be92e4bac671852fd03922049ca592ae4c9f4e Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Sat, 1 Mar 2014 20:24:43 -0500 Subject: changed the gemfile to include rspecy testing and a security name i cant remember the name of --- test/controllers/tournaments_controller_test.rb | 49 ------------------------- 1 file changed, 49 deletions(-) delete mode 100644 test/controllers/tournaments_controller_test.rb (limited to 'test/controllers/tournaments_controller_test.rb') diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb deleted file mode 100644 index bdbbfac..0000000 --- a/test/controllers/tournaments_controller_test.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'test_helper' - -class TournamentsControllerTest < ActionController::TestCase - setup do - @tournament = tournaments(:one) - end - - test "should get index" do - get :index - assert_response :success - assert_not_nil assigns(:tournaments) - end - - test "should get new" do - get :new - assert_response :success - end - - test "should create tournament" do - assert_difference('Tournament.count') do - post :create, tournament: { game_id: @tournament.game_id } - end - - assert_redirected_to tournament_path(assigns(:tournament)) - end - - test "should show tournament" do - get :show, id: @tournament - assert_response :success - end - - test "should get edit" do - get :edit, id: @tournament - assert_response :success - end - - test "should update tournament" do - patch :update, id: @tournament, tournament: { game_id: @tournament.game_id } - assert_redirected_to tournament_path(assigns(:tournament)) - end - - test "should destroy tournament" do - assert_difference('Tournament.count', -1) do - delete :destroy, id: @tournament - end - - assert_redirected_to tournaments_path - end -end -- cgit v1.2.3-2-g168b From 423d0e5a440d8d66407522bc842ef273196173bc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 3 Mar 2014 22:20:02 -0500 Subject: run ./generate.sh --- test/controllers/tournaments_controller_test.rb | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/controllers/tournaments_controller_test.rb (limited to 'test/controllers/tournaments_controller_test.rb') diff --git a/test/controllers/tournaments_controller_test.rb b/test/controllers/tournaments_controller_test.rb new file mode 100644 index 0000000..bdbbfac --- /dev/null +++ b/test/controllers/tournaments_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class TournamentsControllerTest < ActionController::TestCase + setup do + @tournament = tournaments(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:tournaments) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create tournament" do + assert_difference('Tournament.count') do + post :create, tournament: { game_id: @tournament.game_id } + end + + assert_redirected_to tournament_path(assigns(:tournament)) + end + + test "should show tournament" do + get :show, id: @tournament + assert_response :success + end + + test "should get edit" do + get :edit, id: @tournament + assert_response :success + end + + test "should update tournament" do + patch :update, id: @tournament, tournament: { game_id: @tournament.game_id } + assert_redirected_to tournament_path(assigns(:tournament)) + end + + test "should destroy tournament" do + assert_difference('Tournament.count', -1) do + delete :destroy, id: @tournament + end + + assert_redirected_to tournaments_path + end +end -- cgit v1.2.3-2-g168b