Sha256: 2be11fdc18e35f35c1fa9fbc12c4b0cc7f1b0913692196c4c452ed6e648d6ec1

Contents?: true

Size: 647 Bytes

Versions: 18

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/feature_pages/_empty.html.erb', type: :view do
  let(:can?) { false }
  before do
    allow(view).to receive_messages(can?: can?)
    render
  end

  describe 'when a user cannot edit' do
    it 'does not render an ordered list of steps' do
      expect(rendered).to_not have_css('ol')
    end
  end

  describe 'when a user can edit' do
    let(:can?) { true }

    it 'renders a heading' do
      expect(rendered).to have_css('h2', text: 'Building this feature page')
    end

    it 'renders an ordered list of steps' do
      expect(rendered).to have_css('ol li', count: 6)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.13.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.12.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.12.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.11.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.10.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.9.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.8.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.7.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.1.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.6.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.5.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb