diff --git a/spec/requests/dois_spec.rb b/spec/requests/dois_spec.rb index a923a0431..f7be98a6b 100644 --- a/spec/requests/dois_spec.rb +++ b/spec/requests/dois_spec.rb @@ -393,14 +393,8 @@ end before { patch "/dois/10.14454/10703", params: valid_attributes.to_json, headers: headers } - it 'updates the record' do - expect(json.dig('data', 'attributes', 'doi')).to eq("10.14454/10703") - expect(json.dig('data', 'attributes', 'url')).to eq("http://www.bl.uk/pdf/patspec.pdf") - expect(json.dig('data', 'attributes', 'titles')).to eq([{"title"=>"Właściwości rzutowań podprzestrzeniowych"}, {"title"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}]) - expect(json.dig('data', 'attributes', 'schemaVersion')).to eq("http://datacite.org/schema/kernel-2.2") - - xml = Maremma.from_xml(Base64.decode64(json.dig('data', 'attributes', 'xml'))).fetch("resource", {}) - expect(xml.dig("titles", "title")).to eq(["Właściwości rzutowań podprzestrzeniowych", {"__content__"=>"Translation of Polish titles", "titleType"=>"TranslatedTitle"}]) + it 'returns status code 422' do + expect(response).to have_http_status(422) end it 'returns an error that schema is no longer supported' do