diff options
| author | Xinhui | 2016-10-17 13:22:51 +0200 | 
|---|---|---|
| committer | Xinhui | 2016-10-17 13:22:51 +0200 | 
| commit | f282672d581a826411271dc37fd173bf49f30f76 (patch) | |
| tree | 03b965e3736756c686e54dbd7ae4034fd9718503 /spec/models/organisation_spec.rb | |
| parent | 972c635d3ac481989d3a7da8326d192cf34116ee (diff) | |
| download | chouette-core-f282672d581a826411271dc37fd173bf49f30f76.tar.bz2 | |
Store organisation functional_scope
Refs #1785
Diffstat (limited to 'spec/models/organisation_spec.rb')
| -rw-r--r-- | spec/models/organisation_spec.rb | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/organisation_spec.rb b/spec/models/organisation_spec.rb index 9d9749b18..c0aba2eb8 100644 --- a/spec/models/organisation_spec.rb +++ b/spec/models/organisation_spec.rb @@ -33,6 +33,12 @@ describe Organisation, :type => :model do        expect(Organisation.all.map(&:name)).to include 'ALBATRANS', 'OPTILE', 'SNCF', 'STIF'      end +    it 'should retrieve functional scope' do +      Organisation.portail_sync +      org = Organisation.find_by(code: 'RATP') +      expect(org.sso_attributes['functional_scope']).to eq "[STIF:CODIFLIGNE:Line:C00840, STIF:CODIFLIGNE:Line:C00086]" +    end +      it 'should update existing organisations' do        create :organisation, name: 'dummy_name', code:'RATP', updated_at: 10.days.ago        Organisation.portail_sync  | 
