diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-02-18 18:16:28 -0500 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-02-18 18:16:28 -0500 |
commit | 94a5654371812905c154f29cef393d42f13c5eaa (patch) | |
tree | 6bd168b6837f8ae9e4725bc1cdbdfc52cb1f9c5c /test/controllers/teams_controller_test.rb | |
parent | 5f5a3ca46b0c59f698a49de463d72492cfe60f37 (diff) |
Added the generate shell command. Please do not commit the generated files.
Diffstat (limited to 'test/controllers/teams_controller_test.rb')
-rw-r--r-- | test/controllers/teams_controller_test.rb | 49 |
1 files changed, 49 insertions, 0 deletions
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 |