Checking if attachment is really deleted from database

This commit is contained in:
Marcos Tapajós 2010-08-03 23:20:29 -03:00 committed by Sam Lown
parent 2d4b19e913
commit 08541c2d1a

View file

@ -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