Sha256: 5af649703b9832e8f7500f0966bb388341ff7740d041934b1bfb9dd6a13a04e4

Contents?: true

Size: 513 Bytes

Versions: 27

Compression:

Stored size: 513 Bytes

Contents

require 'spec_helper'

module Spotlight
  describe 'shared/_analytics', type: :view do
    it 'is empty without Google Analytics configured' do
      render
      expect(rendered).to be_empty
    end

    it 'renders the GA script tag if the web property id is configured' do
      allow(Spotlight::Engine.config).to receive(:ga_web_property_id).and_return('XYZ-234')
      render
      expect(rendered).to have_selector 'script', visible: false
      expect(rendered).to have_content 'XYZ-234'
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
blacklight-spotlight-0.18.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.17.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.17.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.8.2 spec/views/shared/_analytics.html.erb_spec.rb