summaryrefslogtreecommitdiff
path: root/test/unit/tenant_test.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 22:17:32 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 22:17:32 +0100
commitaf79440bd75d2cffb2eb0ba43b5cfe918a78162c (patch)
treefd6c4dab5dc56fed5f616ddec20e1f82780f20fe /test/unit/tenant_test.rb
parent648f51a0ac97675d6cdf6a4b0c3c75bc9ea23168 (diff)
parent9f14a9a6573db607b79124524088803812454515 (diff)
Merge branch 'rename_factory_class' into develop
Conflicts: Gemfile.lock
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!