Skip to content

Commit

Permalink
Adds tests for the SolrDocument to boost test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Jan 28, 2025
1 parent c472f84 commit fe85574
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/models/solr_document_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'rails_helper'

RSpec.describe SolrDocument do
it 'is keyed on id' do
expect(SolrDocument.unique_key).to eq 'id'
end

describe 'extensions' do
let(:extensions) { SolrDocument.registered_extensions.pluck :module_obj }

it 'uses the email extension' do
expect(extensions).to include Blacklight::Document::Email
end

it 'uses the sms extension' do
expect(extensions).to include Blacklight::Document::Sms
end

it 'uses the dublin core extension' do
expect(extensions).to include Blacklight::Document::DublinCore
end
end
end

0 comments on commit fe85574

Please sign in to comment.