Fix attachment spec now that it's outputting filename as well

pull/9839/head
Oliver Günther 3 years ago
parent 765a8e7814
commit dafa2a3aac
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 6
      spec/models/attachment_spec.rb

@ -248,7 +248,7 @@ describe Attachment, type: :model do
before { image_attachment.save! }
it "should make S3 use content_disposition inline" do
expect(image_attachment.content_disposition).to eq "inline"
expect(image_attachment.content_disposition).to eq "inline; filename=image.png"
expect(image_attachment.external_url.to_s).to include "response-content-disposition=inline"
end
@ -262,7 +262,7 @@ describe Attachment, type: :model do
before { text_attachment.save! }
it "should make S3 use content_disposition inline" do
expect(text_attachment.content_disposition).to eq "inline"
expect(text_attachment.content_disposition).to eq "inline; filename=testfile.txt"
expect(text_attachment.external_url.to_s).to include "response-content-disposition=inline"
end
end
@ -282,7 +282,7 @@ describe Attachment, type: :model do
before { binary_attachment.save! }
it "should make S3 use content_disposition 'attachment; filename=...'" do
expect(binary_attachment.content_disposition).to eq "attachment"
expect(binary_attachment.content_disposition).to eq "attachment; filename=textfile.txt.gz"
expect(binary_attachment.external_url.to_s).to include "response-content-disposition=attachment"
end
end

Loading…
Cancel
Save