From 34a27dafbe109b80787f25d71694f48510e55ec4 Mon Sep 17 00:00:00 2001 From: Alex Kiessling Date: Mon, 13 Dec 2021 11:52:14 -0500 Subject: [PATCH] rubocop fixes --- spec/requests/api/v1/publications_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/requests/api/v1/publications_spec.rb b/spec/requests/api/v1/publications_spec.rb index 5fa5c3eb5..310725c20 100644 --- a/spec/requests/api/v1/publications_spec.rb +++ b/spec/requests/api/v1/publications_spec.rb @@ -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) @@ -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')