21 lines
393 B
Ruby
21 lines
393 B
Ruby
require "test_helper"
|
|
|
|
class CredentialTest < ActiveSupport::TestCase
|
|
test "email must be present" do
|
|
@c = Credential.new
|
|
assert !@c.save
|
|
end
|
|
|
|
test "email must be valid" do
|
|
@c = Credential.new
|
|
@c.email = "not on your nelly"
|
|
assert !@c.save
|
|
end
|
|
|
|
test "email must be unique" do
|
|
@c = Credential.new
|
|
@c.email = "bob@example.net"
|
|
assert !@c.save
|
|
end
|
|
end
|