Skip to content
Browse files

added spec when save returns false

  • Loading branch information...
1 parent ebbb019 commit 395165c0aec84b982540e65e679012ab56757db4 @mkristian committed Dec 4, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/ldap_adapter_spec.rb
View
9 spec/ldap_adapter_spec.rb
@@ -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]

0 comments on commit 395165c

Please sign in to comment.
Something went wrong with that request. Please try again.