Sha256: 3ebc5d00b64be4fc29d3724e256ed524a990e5a0b23e9df3ac0dedd2f396f7d5

Contents?: true

Size: 961 Bytes

Versions: 16

Compression:

Stored size: 961 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/dashboards/analytics.html.erb', type: :view do
  let(:current_exhibit) { FactoryBot.create(:exhibit) }

  before do
    allow(view).to receive_messages(current_exhibit: current_exhibit, exhibit_root_path: '/some/path')
  end

  it 'has a header' do
    render
    expect(rendered).to have_selector '.page-header', text: 'Curation'
    expect(rendered).to have_selector '.page-header small', text: 'Analytics'
  end

  it 'has directions for configuring analytics' do
    render
    expect(rendered).to have_link 'configure an analytics provider'
  end

  context 'with a configured analytics integration' do
    before do
      allow(Spotlight::Analytics::Ga).to receive(:enabled?).and_return(true)
      stub_template 'spotlight/dashboards/_analytics.html.erb' => 'Analytics data'
    end

    it 'has analytics data' do
      render

      expect(rendered).to have_content 'Analytics data'
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
blacklight-spotlight-2.13.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.12.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.12.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.11.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.10.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.9.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.8.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.7.2 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.7.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.7.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.6.1.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.6.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.6.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.5.2 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.5.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-2.5.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb