-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HYC-1282: Attach PDFs to object ingested through Sage (#746)
- If the app can't map the license uri to the controlled vocabulary, log a warning to the Rails log (we still want the object to save / do the rest of the ingest, but we want to know about it so that we can add that license to the controlled vocabulary and add it to the object that's missing it) - Update the sage logger to log to its own file in the logs directory, which is now configured with sane defaults - Raise errors if the admin set or user from the configuration can't be found (the job will fail eventually, might as well fail early) - Do not unzip the file within a temp directory block, because then the background jobs won't be able to find it - Will need to add these files to the cleanup cron job - Create the file_set with the PDF and attach it to the work - Refactor the Sage feature test not to use a before(:all) block - it's less good practice to use :all and it was making mocking things difficult. Found other ways to make test somewhat faster (combined some tests with shared setup)
- Loading branch information
Showing
16 changed files
with
405 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,14 @@ | |
# testing overrides | ||
RSpec.feature 'Create a batch of works', js: false do | ||
context 'a logged in user' do | ||
let(:user) do | ||
User.new(email: '[email protected]', guest: false, uid: 'test') { |u| u.save!(validate: false) } | ||
end | ||
let(:user) { FactoryBot.create(:user) } | ||
|
||
let(:admin_user) do | ||
User.find_by_user_key('admin') | ||
end | ||
let(:admin_user) { FactoryBot.create(:admin) } | ||
|
||
scenario 'as a non-admin' do | ||
login_as user | ||
visit root_path | ||
expect(page).to have_content user.uid | ||
expect(page).to have_content user.display_name | ||
|
||
within("//ul[@id='user_utility_links']") do | ||
click_link 'Dashboard' | ||
|
@@ -33,7 +29,7 @@ | |
scenario 'as an admin' do | ||
login_as admin_user | ||
visit root_path | ||
expect(page).to have_content admin_user.uid | ||
expect(page).to have_content admin_user.display_name | ||
|
||
within("//ul[@id='user_utility_links']") do | ||
click_link 'Dashboard' | ||
|
Oops, something went wrong.