Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests certification_type.rb #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions test/unit/certification_type_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'test_helper'

class CertificationTypeTest < ActiveSupport::TestCase
should validate_presence_of(:name)

context "within Certification Type Context, " do
setup do
@charge1 = FactoryGirl.create(:charge_type)
end

should "show that all factories are properly created" do
assert_equal 1, ChargeType.all.size
end

should "prevent creation of charge_types with non-unique names" do
@charge2 = FactoryGirl.build(:charge_type, name: @charge1.name)
deny @charge2.valid?
end
end

end