Sha256: 63d5096b9bc93039b828548cc1b047e9faf36b10372327b66e88fc64dabca74b
Contents?: true
Size: 591 Bytes
Versions: 10
Compression:
Stored size: 591 Bytes
Contents
require 'spec_helper' describe 'hyrax/uploads/create.json.jbuilder' do let(:file) { double(filename: 'foo.jpg', size: 777) } let(:uploader) { instance_double(Hyrax::UploadedFileUploader, file: file) } let(:upload) { mock_model(Hyrax::UploadedFile, file: uploader) } before do assign(:upload, upload) render end it "renders json of the curation_concern" do json = JSON.parse(rendered).fetch('files').first expect(json['id']).to eq upload.id expect(json['name']).to eq 'foo.jpg' expect(json['deleteUrl']).to eq hyrax.uploaded_file_path(upload) end end
Version data entries
10 entries across 10 versions & 2 rubygems