summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-02-18 18:16:28 -0500
committerAndrewMurrell <amurrel@purdue.edu>2014-02-18 18:16:28 -0500
commit94a5654371812905c154f29cef393d42f13c5eaa (patch)
tree6bd168b6837f8ae9e4725bc1cdbdfc52cb1f9c5c /test
parent5f5a3ca46b0c59f698a49de463d72492cfe60f37 (diff)
Added the generate shell command. Please do not commit the generated files.
Diffstat (limited to 'test')
-rw-r--r--test/controllers/matches_controller_test.rb49
-rw-r--r--test/controllers/servers_controller_test.rb49
-rw-r--r--test/controllers/teams_controller_test.rb49
-rw-r--r--test/controllers/tournaments_controller_test.rb49
-rw-r--r--test/controllers/users_controller_test.rb49
-rw-r--r--test/fixtures/matches.yml11
-rw-r--r--test/fixtures/servers.yml11
-rw-r--r--test/fixtures/teams.yml11
-rw-r--r--test/fixtures/tournaments.yml11
-rw-r--r--test/fixtures/users.yml11
-rw-r--r--test/helpers/matches_helper_test.rb4
-rw-r--r--test/helpers/servers_helper_test.rb4
-rw-r--r--test/helpers/teams_helper_test.rb4
-rw-r--r--test/helpers/tournaments_helper_test.rb4
-rw-r--r--test/helpers/users_helper_test.rb4
-rw-r--r--test/models/match_test.rb7
-rw-r--r--test/models/server_test.rb7
-rw-r--r--test/models/team_test.rb7
-rw-r--r--test/models/tournament_test.rb7
-rw-r--r--test/models/user_test.rb7
20 files changed, 355 insertions, 0 deletions
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
diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/matches.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/servers.yml b/test/fixtures/servers.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/servers.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/teams.yml b/test/fixtures/teams.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/teams.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/tournaments.yml b/test/fixtures/tournaments.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/tournaments.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
new file mode 100644
index 0000000..937a0c0
--- /dev/null
+++ b/test/fixtures/users.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
diff --git a/test/helpers/matches_helper_test.rb b/test/helpers/matches_helper_test.rb
new file mode 100644
index 0000000..4cc472f
--- /dev/null
+++ b/test/helpers/matches_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class MatchesHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/servers_helper_test.rb b/test/helpers/servers_helper_test.rb
new file mode 100644
index 0000000..8fddf34
--- /dev/null
+++ b/test/helpers/servers_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ServersHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/teams_helper_test.rb b/test/helpers/teams_helper_test.rb
new file mode 100644
index 0000000..b736483
--- /dev/null
+++ b/test/helpers/teams_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TeamsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/tournaments_helper_test.rb b/test/helpers/tournaments_helper_test.rb
new file mode 100644
index 0000000..1cf5269
--- /dev/null
+++ b/test/helpers/tournaments_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TournamentsHelperTest < ActionView::TestCase
+end
diff --git a/test/helpers/users_helper_test.rb b/test/helpers/users_helper_test.rb
new file mode 100644
index 0000000..96af37a
--- /dev/null
+++ b/test/helpers/users_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class UsersHelperTest < ActionView::TestCase
+end
diff --git a/test/models/match_test.rb b/test/models/match_test.rb
new file mode 100644
index 0000000..14436b1
--- /dev/null
+++ b/test/models/match_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class MatchTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/server_test.rb b/test/models/server_test.rb
new file mode 100644
index 0000000..125ffc9
--- /dev/null
+++ b/test/models/server_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ServerTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/team_test.rb b/test/models/team_test.rb
new file mode 100644
index 0000000..8b101cb
--- /dev/null
+++ b/test/models/team_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TeamTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/tournament_test.rb b/test/models/tournament_test.rb
new file mode 100644
index 0000000..24a7e5f
--- /dev/null
+++ b/test/models/tournament_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class TournamentTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/models/user_test.rb b/test/models/user_test.rb
new file mode 100644
index 0000000..82f61e0
--- /dev/null
+++ b/test/models/user_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class UserTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end