Adding certifications; messed up adding certification_users so not staging those
This commit is contained in:
9
test/fixtures/certifications.yml
vendored
Normal file
9
test/fixtures/certifications.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
name: MyString
|
||||
description: MyString
|
||||
|
||||
two:
|
||||
name: MyString
|
||||
description: MyString
|
||||
49
test/functional/certifications_controller_test.rb
Normal file
49
test/functional/certifications_controller_test.rb
Normal 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
|
||||
7
test/unit/certification_test.rb
Normal file
7
test/unit/certification_test.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class CertificationTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
4
test/unit/helpers/certifications_helper_test.rb
Normal file
4
test/unit/helpers/certifications_helper_test.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class CertificationsHelperTest < ActionView::TestCase
|
||||
end
|
||||
Reference in New Issue
Block a user