Add bulk save deferal option to db.delete / doc.destroy, just like on save.
This commit is contained in:
parent
245f525902
commit
36945d5a13
4 changed files with 41 additions and 3 deletions
|
@ -472,6 +472,14 @@ describe CouchRest::Database do
|
|||
it "should fail without an _id" do
|
||||
lambda{@db.delete({"not"=>"a real doc"})}.should raise_error(ArgumentError)
|
||||
end
|
||||
it "should defer actual deletion when using bulk save" do
|
||||
doc = @db.get(@docid)
|
||||
@db.delete doc, true
|
||||
lambda{@db.get @docid}.should_not raise_error
|
||||
@db.bulk_save
|
||||
lambda{@db.get @docid}.should raise_error
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "COPY existing document" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue