Checking if attachment is really deleted from database
This commit is contained in:
parent
9466f67329
commit
0d72447e31
|
@ -30,6 +30,13 @@ describe "Model attachments" do
|
||||||
@obj.delete_attachment(@attachment_name)
|
@obj.delete_attachment(@attachment_name)
|
||||||
@obj.has_attachment?(@attachment_name).should be_false
|
@obj.has_attachment?(@attachment_name).should be_false
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe "creating an attachment" do
|
describe "creating an attachment" do
|
||||||
|
|
Loading…
Reference in a new issue