diff --git a/spec/features/create_work_spec.rb b/spec/features/create_work_spec.rb index 178c098c19..fec55cde8e 100644 --- a/spec/features/create_work_spec.rb +++ b/spec/features/create_work_spec.rb @@ -117,6 +117,8 @@ context "when a file uploaded and then deleted" do before do + allow(Hyrax.config).to receive(:work_requires_files?).and_return(true) + sign_in user click_link 'Works' find('#add-new-work-button').click @@ -129,6 +131,7 @@ within('div#add-files') do attach_file("files[]", "#{Hyrax::Engine.root}/spec/fixtures/image.jp2", visible: false) end + expect(page).to have_css('ul li#required-files.complete', text: 'Add files') click_button 'Delete' # delete the file expect(page).to have_css('ul li#required-files.incomplete', text: 'Add files')