aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorZakaria BOUZIANE2015-02-17 18:01:48 +0100
committerZakaria BOUZIANE2015-02-17 18:01:48 +0100
commitad74d12ada2bbe2fe961424a3ce529f28cc157da (patch)
tree49371deb59941be5582b1c4311791fcfc940d531 /spec/models/user_spec.rb
parent22a0f867d596ff869735eac3f5c5b1028109e813 (diff)
downloadchouette-core-ad74d12ada2bbe2fe961424a3ce529f28cc157da.tar.bz2
Upgrading FactoryGirl to V4.5.0
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index c818f9673..e22e53797 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -5,10 +5,10 @@ describe User, :type => :model do
#it { should validate_presence_of :name }
describe "#destroy" do
- let!(:organisation){Factory(:organisation)}
- let!(:user){Factory(:user, :organisation => organisation)}
+ let!(:organisation){create(:organisation)}
+ let!(:user){create(:user, :organisation => organisation)}
context "user's organisation contains many user" do
- let!(:other_user){Factory(:user, :organisation => organisation)}
+ let!(:other_user){create(:user, :organisation => organisation)}
it "should destoy also user's organisation" do
user.destroy
expect(Organisation.where(:name => organisation.name).exists?).to be_truthy