Skip to content

Commit

Permalink
Merge pull request #6142 from samvera/work-requires-spec
Browse files Browse the repository at this point in the history
ensure `work_requires_file?` is `true` in specs that depend on it
  • Loading branch information
VivianChu authored Aug 8, 2023
2 parents 2d857f8 + 9e604a8 commit c3eb490
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/features/create_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand Down

0 comments on commit c3eb490

Please sign in to comment.