Skip to content

Commit

Permalink
added spec when save returns false
Browse files Browse the repository at this point in the history
  • Loading branch information
mkristian committed Dec 4, 2011
1 parent ebbb019 commit 395165c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/ldap_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ class User
end
end

it 'should return false if save fails' do
DataMapper.repository(:ldap) do
u = User.first(:login.not => "black")
u.age = 'some error'
u.save.should be_false
#p User.all
end
end

it 'should be able to get all the objects' do
DataMapper.repository(:ldap) do
User.all(:login.like => "b%").should == [@user1, @user2, @user3]
Expand Down

0 comments on commit 395165c

Please sign in to comment.