Sha256: d3361800d3705c07c48bc438ce1ef921c4caebd7b3efe75807760a55a972586b

Contents?: true

Size: 704 Bytes

Versions: 7

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe ArcgisHelper, type: :helper do
  describe '#arcgis_link' do
    let(:application_name) { 'My GeoBlacklight Deployment' }

    it 'creates a valid ArcGIS online url with correct params' do
      expect(arcgis_link('http://example.com/foo/MapServer')).to eq 'https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer'
    end
    it 'handles multiple urls' do
      expect(arcgis_link(['http://example.com/foo/MapServer', 'http://example.com/foo/FeatureServer'])).to eq 'https://www.arcgis.com/home/webmap/viewer.html?urls=http%3A%2F%2Fexample.com%2Ffoo%2FMapServer&urls=http%3A%2F%2Fexample.com%2Ffoo%2FFeatureServer'
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
geoblacklight-2.4.0 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.3.0 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.2.1 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.2.0 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.1.2 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.1.1 spec/helpers/arcgis_helper_spec.rb
geoblacklight-2.1.0 spec/helpers/arcgis_helper_spec.rb