-
Notifications
You must be signed in to change notification settings - Fork 10
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 #3667 from sul-dlss/folio-location-code
Pull over location code mapping from the indexer, which handled order…
- Loading branch information
Showing
2 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe Folio::LocationsMap do | ||
describe '.for' do | ||
it 'returns the Folio location code for a given Symphony library and location' do | ||
expect(Folio::LocationsMap.for(library_code: 'GREEN', location_code: 'STACKS')).to eq('GRE-STACKS') | ||
end | ||
end | ||
|
||
describe '.symphony_code_for' do | ||
it 'returns the Symphony location code for a given Folio location' do | ||
expect(Folio::LocationsMap.symphony_code_for(location_code: 'GRE-STACKS')).to eq(['GREEN', 'STACKS']) | ||
expect(Folio::LocationsMap.symphony_code_for(location_code: 'SAL3-STACKS')).to eq(['SAL3', 'STACKS']) | ||
expect(Folio::LocationsMap.symphony_code_for(location_code: 'LANE-LAN')).to eq(['LANE-MED', 'LANE-LAN']) | ||
end | ||
end | ||
end |