Skip to content

Commit

Permalink
Merge pull request #2179 from projecthydra/my-shares-test
Browse files Browse the repository at this point in the history
Adjusting test to match updated blacklight-access-controls
  • Loading branch information
jcoyne committed Jun 9, 2016
2 parents bff81f1 + 0c83d25 commit 1f7a17f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/search_builder/sufia/my_shares_search_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
current_user: me) }
let(:builder) { described_class.new(scope) }

before { allow(builder).to receive(:gated_discovery_filters).and_return(["access_filter1", "access_filter2"]) }

subject { builder.to_hash['fq'] }

it "filters things we have access to in which we are not the depositor" do
expect(subject).to eq ["edit_access_group_ssim:public OR edit_access_group_ssim:registered OR edit_access_person_ssim:#{me.user_key}",
expect(subject).to eq ["access_filter1 OR access_filter2",
"{!terms f=has_model_ssim}GenericWork,Collection",
"-_query_:\"{!field f=depositor_ssim}#{me.user_key}\""]
"-_query_:\"{!field f=depositor_ssim}#{me.email}\""]
end
end

0 comments on commit 1f7a17f

Please sign in to comment.