Sha256: f1b758852b3d262db04df981338d05d56f616a2eeac9688f0530d36850528d8d
Contents?: true
Size: 1.38 KB
Versions: 22
Compression:
Stored size: 1.38 KB
Contents
shared_context 'with indexed item' do include_context 'clear repository' before do clear_search_index indexer = Krikri::QASearchIndex.new records.each { |rec| indexer.add rec.to_jsonld['@graph'].first } indexer.commit end after do clear_search_index end let(:records) { [agg] } let(:agg) do provider_agent = provider.agent provider_agent.label = provider.name aggregation = build(:aggregation, provider: provider_agent) aggregation.set_subject! 'moomin' aggregation end let(:provider) { build(:krikri_provider) } end shared_context 'with missing values' do include_context 'with indexed item' do let(:records) { [agg, empty, empty_new_provider] } let(:empty) do provider_agent = provider.agent provider_agent.label = provider.name aggregation = build(:aggregation, provider: provider_agent, sourceResource: nil) aggregation.set_subject! 'empty' aggregation end let(:empty_new_provider) do provider_agent = build(:krikri_provider, rdf_subject: 'http://example.com/fake').agent aggregation = build(:aggregation, provider: provider_agent, sourceResource: nil) aggregation.set_subject! 'empty_new_provider' aggregation end end end
Version data entries
22 entries across 22 versions & 1 rubygems