summaryrefslogtreecommitdiff
path: root/test/unit/phone_test.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 22:03:10 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-30 22:03:10 +0100
commit4e716cea253be9293b247fbe74d25fe288b7853f (patch)
treee7d5ba33b69dfcfbc910d157ca65591a8f022c5b /test/unit/phone_test.rb
parentcac008f58299c443557867588288d7c954026dd2 (diff)
Converted Factory to FactoryGirl.
Diffstat (limited to 'test/unit/phone_test.rb')
-rw-r--r--test/unit/phone_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/phone_test.rb b/test/unit/phone_test.rb
index 4ad21df..b9d33af 100644
--- a/test/unit/phone_test.rb
+++ b/test/unit/phone_test.rb
@@ -3,19 +3,19 @@ require 'test_helper'
class PhoneTest < ActiveSupport::TestCase
def test_should_have_a_valid_factory
- assert Factory.build(:phone).valid?
+ assert FactoryGirl.build(:phone).valid?
end
# test "should destroy_all phones_sip_accounts if the phoneable changed" do
- # sip_domain = Factory.create(:sip_domain)
- # tenant = sip_domain.tenants.create(Factory.build(:tenant).attributes)
+ # sip_domain = FactoryGirl.create(:sip_domain)
+ # tenant = sip_domain.tenants.create(FactoryGirl.build(:tenant).attributes)
#
- # user1 = Factory.create(:user)
- # user2 = Factory.create(:user)
+ # user1 = FactoryGirl.create(:user)
+ # user2 = FactoryGirl.create(:user)
# tenant.tenant_memberships.create(:user_id => user1.id)
# tenant.tenant_memberships.create(:user_id => user2.id)
#
- # phone = Factory.create(:phone, :phoneable => tenant)
+ # phone = FactoryGirl.create(:phone, :phoneable => tenant)
#
# # Nothing there
# #
@@ -28,7 +28,7 @@ class PhoneTest < ActiveSupport::TestCase
#
# # create some sip_accounts associated to phone
# #
- # 3.times { Factory.create(:sip_account, :sip_accountable => user1, :tenant_id => tenant.id) }
+ # 3.times { FactoryGirl.create(:sip_account, :sip_accountable => user1, :tenant_id => tenant.id) }
# SipAccount.all.each do |sip_account|
# phone.phones_sip_accounts.create(:sip_account_id => sip_account.id)
# end