spec/ldap_adapter_spec.rb in dm-ldap-adapter-0.4.0.alpha4 vs spec/ldap_adapter_spec.rb in dm-ldap-adapter-0.4.0
- old
+ new
@@ -32,10 +32,18 @@
@user1.new?.should be_false
User.first(:login => @user1.login).new?.should be_false
end
end
+ it 'should be able to use multiline attributes' do
+ DataMapper.repository(:ldap) do
+ @user1.name = "many\nlines\nin\none\property"
+ @user1.save
+ User.get(@user1.id).name.should == "many\nlines\nin\none\property"
+ end
+ end
+
it 'should raise an error when trying to create an entity with already used key' do
DataMapper.repository(:ldap) do
#p User.first(:login => "black")
lambda { User.create(:login => "black", :name => 'Black', :age => 0) }.should raise_error
#p User.all
@@ -227,7 +235,5 @@
DataMapper.repository.adapter.instance_variable_get(:@ldap_connection).current.hash.should_not == hash
end
end
end
end
-
-\