Skip to content

Commit

Permalink
updated specs to use test handle server
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Sep 26, 2018
1 parent e4d99bc commit 5aa72b4
Show file tree
Hide file tree
Showing 19 changed files with 155 additions and 398 deletions.
10 changes: 5 additions & 5 deletions spec/concerns/helpable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
response = subject.get_url

expect(response.body.dig("data", "responseCode")).to eq(1)
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-07-30T07:53:49Z"}])
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/"}, "ttl"=>86400, "timestamp"=>"2018-09-26T08:52:01Z"}])
end

# it 'should register on save' do
Expand All @@ -99,7 +99,7 @@
response = subject.get_url

expect(response.body.dig("data", "responseCode")).to eq(1)
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-07-30T07:53:49Z"}])
expect(response.body.dig("data", "values")).to eq([{"index"=>1, "type"=>"URL", "data"=>{"format"=>"string", "value"=>"https://blog.datacite.org/re3data-science-europe/"}, "ttl"=>86400, "timestamp"=>"2018-09-26T08:52:02Z"}])
end

it 'draft doi' do
Expand All @@ -123,10 +123,10 @@
let(:client) { create(:client, provider: provider, symbol: ENV['MDS_USERNAME'], password: ENV['MDS_PASSWORD']) }

it 'should get dois' do
options = { prefix: "10.14454", username: client.symbol, password: client.password, role_id: "client_admin" }
options = { prefix: "10.5438", username: client.symbol, password: client.password, role_id: "client_admin" }
dois = Doi.get_dois(options).body.dig("data", "handles")
expect(dois.length).to eq(7)
expect(dois.first).to eq("10.14454/07243.2013.001")
expect(dois.length).to eq(438)
expect(dois.first).to eq("10.5438/0000-00SS")
end
end
end
12 changes: 8 additions & 4 deletions spec/fixtures/vcr_cassettes/Doi/get_dois/should_get_dois.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 0 additions & 73 deletions spec/fixtures/vcr_cassettes/Doi/register_doi/draft_doi.yml

This file was deleted.

40 changes: 0 additions & 40 deletions spec/fixtures/vcr_cassettes/Doi/register_doi/missing_username.yml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5aa72b4

Please sign in to comment.