Skip to content

Commit

Permalink
Adjusting test to match updated blacklight-access-controls
Browse files Browse the repository at this point in the history
  • Loading branch information
awead committed Jun 9, 2016
1 parent bff81f1 commit 0c83d25
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 0c83d25

Please sign in to comment.