Skip to content

Commit

Permalink
Publisher param test corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
codycooperross committed Nov 16, 2023
1 parent b6756d5 commit dde6e51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/requests/datacite_dois_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@
end
end

describe "GET /dois with publisher param", elasticsearch: true do
describe "GET /dois with nil publisher values", elasticsearch: true do
let!(:doi) { create(:doi, client: client, publisher: nil) }

it "returns nil publisher when publisher param is not set" do
get "/dois?publisher=true", nil, headers
get "/dois", nil, headers

expect(last_response.status).to eq(200)
json["data"].each do |doi|
Expand All @@ -261,11 +261,11 @@
end
end

describe "GET /dois/:id with publisher param", elasticsearch: true do
describe "GET /dois/:id with nil publisher values", elasticsearch: true do
let!(:doi) { create(:doi, client: client, publisher: nil) }

it "returns nil publisher when publisher param is not set" do
get "/dois/#{doi.doi}?publisher=true", nil, headers
get "/dois/#{doi.doi}", nil, headers

expect(last_response.status).to eq(200)
expect(json.dig("attributes", "publisher")).to eq(nil)
Expand Down

0 comments on commit dde6e51

Please sign in to comment.