Remove Paperclip and use just Active Storage
This commit is contained in:
@@ -4,14 +4,11 @@ describe Document do
|
||||
it_behaves_like "document validations", "budget_investment_document"
|
||||
it_behaves_like "document validations", "proposal_document"
|
||||
|
||||
it "stores attachments with both Paperclip and Active Storage" do
|
||||
it "stores attachments with Active Storage" do
|
||||
document = create(:document, attachment: File.new("spec/fixtures/files/clippy.pdf"))
|
||||
|
||||
expect(document.attachment).to exist
|
||||
expect(document.attachment_file_name).to eq "clippy.pdf"
|
||||
|
||||
expect(document.storage_attachment).to be_attached
|
||||
expect(document.storage_attachment.filename).to eq "clippy.pdf"
|
||||
expect(document.attachment).to be_attached
|
||||
expect(document.attachment.filename).to eq "clippy.pdf"
|
||||
end
|
||||
|
||||
context "scopes" do
|
||||
|
||||
Reference in New Issue
Block a user