-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent non-URLs from being hyperlinked in dct_identifier_sm
Fixes #1399
- Loading branch information
1 parent
18ee5d6
commit adab6c1
Showing
4 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
require 'rails_helper' | ||
|
||
describe 'More detail links' do | ||
context 'when a document has a purl and doi' do | ||
context 'when a document has a purl and doi in its identifiers' do | ||
it 'shows them in more details' do | ||
visit solr_document_path 'stanford-dy750qs3024' | ||
expect(page).to have_link 'https://purl.stanford.edu/dy750qs3024' | ||
expect(page).to have_link 'https://doi.org/10.7946/P2Z31V' | ||
end | ||
end | ||
|
||
context 'when a document has no URLs in its identifiers' do | ||
it 'does not show the more details section' do | ||
visit solr_document_path 'harvard-g7064-s2-1834-k3' | ||
expect(page).to have_no_text 'More details at' | ||
end | ||
end | ||
end |