-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support registration of subject metadata. #228
- Loading branch information
Martin Fenner
committed
Apr 9, 2019
1 parent
27f33e7
commit e9b28bc
Showing
2 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1939,6 +1939,29 @@ | |
end | ||
end | ||
|
||
context 'update subjects' do | ||
let(:subjects) { [{ "subject" => "80505 Web Technologies (excl. Web Search)", | ||
"schemeUri" => "http://www.abs.gov.au/ausstats/[email protected]/0/6BB427AB9696C225CA2574180004463E", | ||
"subjectScheme" => "FOR", | ||
"lang" => "en" }] } | ||
let(:update_attributes) do | ||
{ | ||
"data" => { | ||
"type" => "dois", | ||
"attributes" => { | ||
"subjects" => subjects | ||
} | ||
} | ||
} | ||
end | ||
|
||
before { patch "/dois/#{doi.doi}", params: update_attributes.to_json, headers: headers } | ||
|
||
it 'updates the Doi' do | ||
expect(json.dig('data', 'attributes', 'subjects')).to eq(subjects) | ||
end | ||
end | ||
|
||
context 'landing page' do | ||
let(:url) { "https://blog.datacite.org/re3data-science-europe/" } | ||
let(:xml) { Base64.strict_encode64(file_fixture('datacite.xml').read) } | ||
|