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/matches_controller_test.rb | 49 +++++++++++++++++++++++++ test/controllers/servers_controller_test.rb | 49 +++++++++++++++++++++++++ test/controllers/teams_controller_test.rb | 49 +++++++++++++++++++++++++ test/controllers/tournaments_controller_test.rb | 49 +++++++++++++++++++++++++ test/controllers/users_controller_test.rb | 49 +++++++++++++++++++++++++ 5 files changed, 245 insertions(+) create mode 100644 test/controllers/matches_controller_test.rb create mode 100644 test/controllers/servers_controller_test.rb create mode 100644 test/controllers/teams_controller_test.rb create mode 100644 test/controllers/tournaments_controller_test.rb create mode 100644 test/controllers/users_controller_test.rb (limited to 'test/controllers') diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb new file mode 100644 index 0000000..353ff4b --- /dev/null +++ b/test/controllers/matches_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class MatchesControllerTest < ActionController::TestCase + setup do + @match = matches(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:matches) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create match" do + assert_difference('Match.count') do + post :create, match: { } + end + + assert_redirected_to match_path(assigns(:match)) + end + + test "should show match" do + get :show, id: @match + assert_response :success + end + + test "should get edit" do + get :edit, id: @match + assert_response :success + end + + test "should update match" do + patch :update, id: @match, match: { } + assert_redirected_to match_path(assigns(:match)) + end + + test "should destroy match" do + assert_difference('Match.count', -1) do + delete :destroy, id: @match + end + + assert_redirected_to matches_path + end +end diff --git a/test/controllers/servers_controller_test.rb b/test/controllers/servers_controller_test.rb new file mode 100644 index 0000000..5891bb0 --- /dev/null +++ b/test/controllers/servers_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class ServersControllerTest < ActionController::TestCase + setup do + @server = servers(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:servers) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create server" do + assert_difference('Server.count') do + post :create, server: { } + end + + assert_redirected_to server_path(assigns(:server)) + end + + test "should show server" do + get :show, id: @server + assert_response :success + end + + test "should get edit" do + get :edit, id: @server + assert_response :success + end + + test "should update server" do + patch :update, id: @server, server: { } + assert_redirected_to server_path(assigns(:server)) + end + + test "should destroy server" do + assert_difference('Server.count', -1) do + delete :destroy, id: @server + end + + assert_redirected_to servers_path + end +end diff --git a/test/controllers/teams_controller_test.rb b/test/controllers/teams_controller_test.rb new file mode 100644 index 0000000..8bf60be --- /dev/null +++ b/test/controllers/teams_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class TeamsControllerTest < ActionController::TestCase + setup do + @team = teams(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:teams) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create team" do + assert_difference('Team.count') do + post :create, team: { } + end + + assert_redirected_to team_path(assigns(:team)) + end + + test "should show team" do + get :show, id: @team + assert_response :success + end + + test "should get edit" do + get :edit, id: @team + assert_response :success + end + + test "should update team" do + patch :update, id: @team, team: { } + assert_redirected_to team_path(assigns(:team)) + end + + test "should destroy team" do + assert_difference('Team.count', -1) do + delete :destroy, id: @team + end + + assert_redirected_to teams_path + end +end 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 diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb new file mode 100644 index 0000000..846e74c --- /dev/null +++ b/test/controllers/users_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class UsersControllerTest < ActionController::TestCase + setup do + @user = users(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:users) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create user" do + assert_difference('User.count') do + post :create, user: { } + end + + assert_redirected_to user_path(assigns(:user)) + end + + test "should show user" do + get :show, id: @user + assert_response :success + end + + test "should get edit" do + get :edit, id: @user + assert_response :success + end + + test "should update user" do + patch :update, id: @user, user: { } + assert_redirected_to user_path(assigns(:user)) + end + + test "should destroy user" do + assert_difference('User.count', -1) do + delete :destroy, id: @user + end + + assert_redirected_to users_path + end +end -- cgit v1.2.3-2-g168b