diff options
| author | Luc Donnet | 2015-01-05 14:56:12 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2015-01-05 14:56:12 +0100 | 
| commit | 3bc6d313bebdc1f03e4021aabbc774a0cd97d938 (patch) | |
| tree | ac5b8c6d8309012136606d9fd9b9a00290f486a8 /spec/models/user_spec.rb | |
| parent | e632a4634b1762f4c73d11f1e5b127de9832a1ff (diff) | |
| download | chouette-core-3bc6d313bebdc1f03e4021aabbc774a0cd97d938.tar.bz2 | |
Initialize rails 4 migration
Diffstat (limited to 'spec/models/user_spec.rb')
| -rw-r--r-- | spec/models/user_spec.rb | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index dbf95a120..c818f9673 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,6 +1,6 @@  require 'spec_helper' -describe User do +describe User, :type => :model do    #it { should validate_uniqueness_of :email }    #it { should validate_presence_of :name } @@ -11,10 +11,10 @@ describe User do        let!(:other_user){Factory(:user, :organisation => organisation)}        it "should destoy also user's organisation" do          user.destroy -        Organisation.where(:name => organisation.name).exists?.should be_true +        expect(Organisation.where(:name => organisation.name).exists?).to be_truthy          read_organisation = Organisation.where(:name => organisation.name).first -        read_organisation.users.count.should == 1 -        read_organisation.users.first.should == other_user +        expect(read_organisation.users.count).to eq(1) +        expect(read_organisation.users.first).to eq(other_user)        end      end    end | 
