summaryrefslogtreecommitdiff
path: root/test/unit/tenant_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/tenant_test.rb')
-rw-r--r--test/unit/tenant_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/tenant_test.rb b/test/unit/tenant_test.rb
index 4d4abce..0b342ba 100644
--- a/test/unit/tenant_test.rb
+++ b/test/unit/tenant_test.rb
@@ -2,23 +2,23 @@ require 'test_helper'
class TenantTest < ActiveSupport::TestCase
def test_should_have_a_valid_factory
- assert Factory.build(:tenant).valid?
+ assert FactoryGirl.build(:tenant).valid?
end
def test_should_have_unique_name
- tenant = Factory.create(:tenant)
- assert !Factory.build(:tenant, :name => tenant.name).valid?
- assert Factory.build(:tenant, :name => "different_#{tenant.name}").valid?
+ tenant = FactoryGirl.create(:tenant)
+ assert !FactoryGirl.build(:tenant, :name => tenant.name).valid?
+ assert FactoryGirl.build(:tenant, :name => "different_#{tenant.name}").valid?
end
def test_that_the_initial_state_should_be_active
- @tenant = Factory.create(:tenant)
+ @tenant = FactoryGirl.create(:tenant)
assert_equal 'active', @tenant.state
assert @tenant.active?
end
def test_not_active_state_will_not_be_displayed
- @tenant = Factory.create(:tenant)
+ @tenant = FactoryGirl.create(:tenant)
assert_equal 1, Tenant.count
@tenant.deactivate!