Sha256: 7c9fc3984c55a25bfb3659b90ee3ec9809ad1216df833747f9e9cba52415a553

Contents?: true

Size: 648 Bytes

Versions: 22

Compression:

Stored size: 648 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).not_to 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

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb