Sha256: f796c5ca159e9e18fbca8ad680fe418a76ab97b3cf0c8969d70a48f2fb91c992
Contents?: true
Size: 989 Bytes
Versions: 17
Compression:
Stored size: 989 Bytes
Contents
require 'spec_helper' feature 'Editing attached files' do let(:user) { create(:user) } let!(:parent) { create(:work_with_one_file, user: user) } let!(:file_set) { parent.file_sets.first } before do sign_in user # stub out characterization. Travis doesn't have fits installed, and it's not relevant to the test. expect(CharacterizeJob).to receive(:perform_later) end it 'updates the file' do visit "/concern/generic_works/#{parent.id}" click_link 'Edit' expect(page).to have_content "Updating Attached File to \"Test title\"" attach_file('Upload a file', fixture_file_path('files/image.png')) click_button 'Update Attached File' expect(page).to have_content 'The file A Contained Generic File has been updated.' # TODO: this stuff belongs in an Actor or Controller test: file_set.reload expect(file_set.original_file.original_name).to eq 'image.png' expect(file_set.original_file.mime_type).to eq 'image/png' end end
Version data entries
17 entries across 17 versions & 1 rubygems