19 lines
342 B
Ruby
19 lines
342 B
Ruby
require "test_helper"
|
|
|
|
class DomainTest < ActiveSupport::TestCase
|
|
test "domain can not be blank" do
|
|
@d = Domain.new
|
|
assert !@d.save
|
|
end
|
|
|
|
test "domain can no tbe duplicated" do
|
|
@d1 = Domain.new
|
|
@d1.name = "example.com"
|
|
assert @d1.save
|
|
|
|
@d2 = Domain.new
|
|
@d2.name = "example.com"
|
|
assert !@d2.save
|
|
end
|
|
end
|