Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkiessl committed Dec 13, 2021
1 parent 089e5b9 commit 34a27da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/requests/api/v1/publications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ def query_pubs

context 'when the user of the found record is in multiple orgs (query returns multiple of same record)' do
let!(:org2) { create :organization }

before do
create :organization_api_permission, organization: org2, api_token: token
user.organizations << org2
user.save
query_pubs
end

it 'returns a unique list of publications matching the specified Activity Insight ID', skip_before: true do
expect(json_response[:data].size).to eq(1)
expect(json_response[:data].first[:attributes][:activity_insight_ids].size).to eq(1)
Expand Down Expand Up @@ -125,12 +127,14 @@ def query_pubs

context 'when the user of the found record is in multiple orgs (query returns multiple of same record)' do
let!(:org2) { create :organization }

before do
create :organization_api_permission, organization: org2, api_token: token
user.organizations << org2
user.save
query_pubs
end

it 'returns a unique list of publications matching the specified DOI', skip_before: true do
expect(json_response[:data].size).to eq(1)
expect(json_response[:data].first[:attributes][:doi]).to eq('https://doi.org/10.26207/46a7-9981')
Expand Down

0 comments on commit 34a27da

Please sign in to comment.