Sha256: 3cb5b8488d2ef4ed0966f849fbba15870d24e548eb4f1702822a17bb928705fe
Contents?: true
Size: 818 Bytes
Versions: 1
Compression:
Stored size: 818 Bytes
Contents
describe Sufia::MySharesSearchBuilder do let(:me) { create(:user) } let(:config) { CatalogController.blacklight_config } let(:scope) { double('The scope', blacklight_config: config, params: {}, current_ability: Ability.new(me), current_user: me) } let(:builder) { described_class.new(scope) } 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}", "{!terms f=has_model_ssim}GenericWork,Collection", "-_query_:\"{!field f=depositor_ssim}#{me.user_key}\""] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sufia-7.0.0.beta2 | spec/search_builder/sufia/my_shares_search_builder_spec.rb |