Sha256: bf5cf5fc078fd93052b43efa3d346fd94c49d1bee529c48fd6fa718e334b0540

Contents?: true

Size: 687 Bytes

Versions: 4

Compression:

Stored size: 687 Bytes

Contents

require 'spec_helper'

describe GeoblacklightHelper do
  include GeoblacklightHelper
  include ActionView::Helpers::UrlHelper
  describe '#render_facet_links' do
    it 'should contain unique links' do
      expect(self).to receive(:catalog_index_path).exactly(3).times.and_return("http://example.com/catalog?f[dc_subject_sm][]=category")
      html = Capybara.string(render_facet_links('dc_subject_sm', ['Test', 'Test', 'Earth', 'Science']))
      expect(html).to have_css 'a', count: 3
      expect(html).to have_css 'a', text: 'Test', count: 1
      expect(html).to have_css 'a', text: 'Earth', count: 1
      expect(html).to have_css 'a', text: 'Science', count: 1
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geoblacklight-0.3.0 spec/helpers/geoblacklight_helpers_spec.rb
geoblacklight-0.2.2 spec/helpers/geoblacklight_helpers_spec.rb
geoblacklight-0.2.1 spec/helpers/geoblacklight_helpers_spec.rb
geoblacklight-0.2.0 spec/helpers/geoblacklight_helpers_spec.rb