Files
fizzy/saas/test/models/identity_test.rb
T
Mike Dalessio d82d68fcd0 Restrict logins to employees in staging
as inferred from the email domain, which must be "@37signals.com" or
"@basecamp.com".
2025-12-12 15:07:16 -05:00

19 lines
605 B
Ruby

require "test_helper"
class Fizzy::Saas::IdentityTest < ActiveSupport::TestCase
test "#employee? returns true for 37signals.com domains" do
identity = Identity.new(email_address: "mike@37signals.com")
assert_predicate identity, :employee?
end
test "#employee? returns true for basecamp.com domains" do
identity = Identity.new(email_address: "mike@basecamp.com")
assert_predicate identity, :employee?
end
test "#employee? returns false for other domains" do
identity = Identity.new(email_address: "mike@example.com")
assert_not_predicate identity, :employee?
end
end