Sha256: 81c5a0874233b87af6c735ffe3879c37039e96bbcf6d40cb53bc8bc2711333bd

Contents?: true

Size: 932 Bytes

Versions: 32

Compression:

Stored size: 932 Bytes

Contents

describe 'spotlight/dashboards/analytics.html.erb', type: :view do
  let(:current_exhibit) { FactoryGirl.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

32 entries across 32 versions & 1 rubygems

Version Path
blacklight-spotlight-1.0.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.34.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.34.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.33.3 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.33.2 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.33.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.33.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.32.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.31.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.30.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.29.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.29.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.28.3 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.28.2 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.28.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.28.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.27.0 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb
blacklight-spotlight-0.26.1 spec/views/spotlight/dashboards/analytics.html.erb_spec.rb