Sha256: d34ade9f2afc644222a0dbf1b022e9a8480025e86381a0ef59e08c7563f86d14

Contents?: true

Size: 616 Bytes

Versions: 9

Compression:

Stored size: 616 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.4.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.3.3 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.3.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.3.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.3.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.2.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.2.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-2.1.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb