Sha256: 65703de4ab0a7220b06d0e3d912accac10248caf3976acd8f90db996cad3bb3c

Contents?: true

Size: 637 Bytes

Versions: 28

Compression:

Stored size: 637 Bytes

Contents

require 'spec_helper'

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

28 entries across 28 versions & 1 rubygems

Version Path
blacklight-spotlight-0.19.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.18.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.17.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.17.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.16.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.15.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.14.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.13.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.12.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.12.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.11.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.3 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.10.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.2 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.1 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb
blacklight-spotlight-0.9.0 spec/views/spotlight/feature_pages/_empty.html.erb_spec.rb