Sha256: 2e24e1edb27ea01b2d2a7d3541f88d195811e514ee3419d80dcd808cf250713b

Contents?: true

Size: 444 Bytes

Versions: 57

Compression:

Stored size: 444 Bytes

Contents

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

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
blacklight-spotlight-1.4.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.3.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.2.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.1.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.0.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.34.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.34.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.33.3 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.33.2 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.33.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.33.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.32.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.31.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.30.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.29.1 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.29.0 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.28.3 spec/views/shared/_analytics.html.erb_spec.rb
blacklight-spotlight-0.28.2 spec/views/shared/_analytics.html.erb_spec.rb