all model tests now pass

This commit is contained in:
2023-05-15 15:13:01 +01:00
parent 9ac685fd15
commit 2fe142ed86
4 changed files with 64 additions and 3 deletions

View File

@@ -1,7 +1,20 @@
require "test_helper"
class CredentialTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
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