Add spec to check image attachment destroy method on budget investment model.

This commit is contained in:
Senén Rodero Rodríguez
2017-06-26 16:46:10 +02:00
parent f23fd927d6
commit 5ecf228b09

View File

@@ -99,6 +99,11 @@ describe Budget::Investment do
end end
it "image destroy should remove image from file storage" do
image_url = investment_with_image.image.url
expect{ investment_with_image.image.destroy }.to change{ investment_with_image.image.url }.from(image_url).to("/images/original/missing.png")
end
end end
it "sanitizes description" do it "sanitizes description" do