Skip to content

Commit

Permalink
institution check should not be case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Nov 12, 2014
1 parent f546afa commit 3816204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/geoblacklight/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def download_types
end

def same_institution?
get(:dct_provenance_s) == Settings.INSTITUTION
get(:dct_provenance_s).downcase == Settings.INSTITUTION.downcase
end

def itemtype
Expand Down
4 changes: 4 additions & 0 deletions spec/lib/geoblacklight/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
allow(Settings).to receive('Institution').and_return('Stanford')
expect(document.same_institution?).to be_truthy
end
it 'should match case inconsistencies' do
allow(Settings).to receive('Institution').and_return('StAnFord')
expect(document.same_institution).to be_truthy
end
end
describe 'within a different institution' do
let(:document_attributes) { { dct_provenance_s: 'MIT' } }
Expand Down

0 comments on commit 3816204

Please sign in to comment.