spec/api_spec.rb in cirneco-0.9.9 vs spec/api_spec.rb in cirneco-0.9.10
- old
+ new
@@ -73,9 +73,14 @@
it 'should get doi' do
response = subject.get_doi(doi, options)
expect(response.body["data"]).to eq("http://www.datacite.org")
end
+ it 'should get doi not found' do
+ response = subject.get_doi("10.5072/0000-03V", options)
+ expect(response.status).to eq(404)
+ end
+
it 'username missing' do
options = { username: username, sandbox: true }
response = subject.get_doi(doi, options)
expect(response.body).to eq("errors"=>[{"title"=>"Username or password missing"}])
end