diff options
author | spag <spag@golwen.net> | 2012-12-31 08:50:27 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2012-12-31 08:50:27 +0100 |
commit | aed84444142604a62e37e57acfaaf957219e2c8d (patch) | |
tree | e00b1f5844590393171e0bc839ab516d39f5144d /test/functional/phone_models_controller_test.rb | |
parent | c24bd3a8212e85894b2f7c26e190fe5e89fbaaf2 (diff) | |
parent | 12c8f4c82770ded6ea6b519e4451ed6757419ddf (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'test/functional/phone_models_controller_test.rb')
-rw-r--r-- | test/functional/phone_models_controller_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/phone_models_controller_test.rb b/test/functional/phone_models_controller_test.rb index 2d1a87a..199be45 100644 --- a/test/functional/phone_models_controller_test.rb +++ b/test/functional/phone_models_controller_test.rb @@ -4,21 +4,21 @@ class PhoneModelsControllerTest < ActionController::TestCase setup do # Create a tenant: - @tenant = Factory.create(:tenant) + @tenant = FactoryGirl.create(:tenant) # Create a User who is member of the Tenant but has no special rights: - @user = Factory.create(:user) + @user = FactoryGirl.create(:user) @tenant.tenant_memberships.create(:user_id => @user.id) @user.update_attributes!(:current_tenant_id => @tenant.id) # Create a User who is member of the Tenant and has super admin rights: - @super_admin = Factory.create(:user) + @super_admin = FactoryGirl.create(:user) @tenant.tenant_memberships.create(:user_id => @super_admin.id) @super_admin.update_attributes!(:current_tenant_id => @tenant.id) # Create a PhoneModel # - @phone_model = Factory.create(:phone_model) + @phone_model = FactoryGirl.create(:phone_model) end [ '@user.id', '' ].each do |user_id_code| @@ -44,7 +44,7 @@ class PhoneModelsControllerTest < ActionController::TestCase session[:user_id] = eval( user_id_code ) assert_no_difference('PhoneModel.count') do - post :create, manufacturer_id: @phone_model.manufacturer_id, phone_model: Factory.build(:phone_model, + post :create, manufacturer_id: @phone_model.manufacturer_id, phone_model: FactoryGirl.build(:phone_model, :manufacturer_id => @phone_model.manufacturer_id).attributes end end @@ -106,7 +106,7 @@ class PhoneModelsControllerTest < ActionController::TestCase # # add routes first. # test "should create phone_model as super admin" do # assert_difference('PhoneModel.count') do - # post :create, phone_model: Factory.build(:phone_model, + # post :create, phone_model: FactoryGirl.build(:phone_model, # :manufacturer_id => @phone_model.manufacturer_id).attributes # end # |