Adding certifications; messed up adding certification_users so not staging those

This commit is contained in:
2013-01-25 03:12:25 -07:00
parent fe283b051f
commit 43d949dc1d
20 changed files with 264 additions and 4 deletions

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class CertificationsControllerTest < ActionController::TestCase
setup do
@certification = certifications(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:certifications)
end
test "should get new" do
get :new
assert_response :success
end
test "should create certification" do
assert_difference('Certification.count') do
post :create, :certification => { :description => @certification.description, :name => @certification.name }
end
assert_redirected_to certification_path(assigns(:certification))
end
test "should show certification" do
get :show, :id => @certification
assert_response :success
end
test "should get edit" do
get :edit, :id => @certification
assert_response :success
end
test "should update certification" do
put :update, :id => @certification, :certification => { :description => @certification.description, :name => @certification.name }
assert_redirected_to certification_path(assigns(:certification))
end
test "should destroy certification" do
assert_difference('Certification.count', -1) do
delete :destroy, :id => @certification
end
assert_redirected_to certifications_path
end
end