-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5038 from samvera/permission-template-docs
add some documentation for `Hyrax::PermissionTemplate`
- Loading branch information
Showing
4 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
spec/indexers/hyrax/valkyrie_administrative_set_indexer_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'hyrax/specs/shared_specs' | ||
|
||
RSpec.describe Hyrax::AdministrativeSetIndexer do | ||
subject(:service) { described_class.new(resource: admin_set) } | ||
let(:admin_set) { FactoryBot.valkyrie_create(:hyrax_admin_set, title: [admin_set_title]) } | ||
let(:admin_set_title) { 'An Admin Set' } | ||
|
||
it 'is resolved from an admin set' do | ||
expect(Hyrax::ValkyrieIndexer.for(resource: admin_set)) | ||
.to be_a described_class | ||
end | ||
|
||
describe '#to_solr' do | ||
it 'includes default attributes ' do | ||
expect(subject.to_solr) | ||
.to include 'generic_type_si' => 'Admin Set', 'title_tesim' => [admin_set_title] | ||
end | ||
end | ||
end |