Skip to content

Commit

Permalink
Adjust the test to match the new error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorcorrea committed May 3, 2024
1 parent e1d02d7 commit 0c4de78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/works_wizard_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@
# TODO: - how do we tell the user there was an error now that this in not in the page context?
# This error that is happening seems to be just a random error so it is ok that we still capture that
expect(response).to redirect_to(work_file_upload_path(work))
expect(controller.flash[:notice].start_with?("Failed to attach the file uploads for the work #{work.doi}")).to be true
expect(Rails.logger).to have_received(:error).with(/Failed to attach the file uploads for the work #{work.doi}/)
expect(controller.flash[:notice].start_with?("Failed to update work snapshot, work: #{work.doi}")).to be true
expect(Rails.logger).to have_received(:error).with(/Failed to update work snapshot, URL: http\:\/\/test.host\/works\/#{work.id}\/file-upload/)
end
end
end
Expand Down

0 comments on commit 0c4de78

Please sign in to comment.