From 08541c2d1aedd004e6eeae54bcf7ff33d3f319a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Tapaj=C3=B3s?= Date: Tue, 3 Aug 2010 23:20:29 -0300 Subject: [PATCH] Checking if attachment is really deleted from database --- spec/couchrest/attachment_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/couchrest/attachment_spec.rb b/spec/couchrest/attachment_spec.rb index 75331e1..ac3de02 100644 --- a/spec/couchrest/attachment_spec.rb +++ b/spec/couchrest/attachment_spec.rb @@ -30,6 +30,13 @@ describe "Model attachments" do @obj.delete_attachment(@attachment_name) @obj.has_attachment?(@attachment_name).should be_false end + + it 'should return false if an attachment has been removed and reloaded' do + @obj.delete_attachment(@attachment_name) + reloaded_obj = Basic.get(@obj.id) + reloaded_obj.has_attachment?(@attachment_name).should be_false + end + end describe "creating an attachment" do