Sha256: d535b8248cf468e38469e6c2506f7b253ba49e80b8ee97e1d8b41497ed997696

Contents?: true

Size: 1.36 KB

Versions: 79

Compression:

Stored size: 1.36 KB

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::LayoutHelperBehavior do
  describe '#show_content_classes' do
    it 'returns a string of classes' do
      expect(helper.show_content_classes).to be_an String
      expect(helper.show_content_classes).to eq 'col-lg-9 show-document'
    end
  end

  describe '#show_sidebar_classes' do
    it 'returns a string of classes' do
      expect(helper.show_sidebar_classes).to be_an String
      expect(helper.show_sidebar_classes).to eq 'page-sidebar col-lg-3'
    end
  end

  describe '#main_content_classes' do
    it 'returns a string of classes' do
      expect(helper.main_content_classes).to be_an String
      expect(helper.main_content_classes).to eq 'col-lg-9'
    end
  end

  describe '#sidebar_classes' do
    it 'returns a string of classes' do
      expect(helper.sidebar_classes).to be_an String
      expect(helper.sidebar_classes).to eq 'page-sidebar col-lg-3'
    end
  end

  describe '#container_classes' do
    it 'returns a string of classe(s)' do
      expect(helper.container_classes).to be_an String
      expect(helper.container_classes).to eq 'container'
    end
  end

  describe '#html_tag_attributes' do
    before do
      allow(I18n).to receive(:locale).and_return('x')
    end

    it 'returns the current locale as the lang' do
      expect(helper.html_tag_attributes).to include lang: 'x'
    end
  end
end

Version data entries

79 entries across 79 versions & 2 rubygems

Version Path
blacklight-7.38.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.2.2 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.2.1 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.2.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.37.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.36.2 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.36.1 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.36.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.35.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.1.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.34.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.1 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0.beta8 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0.beta7 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0.beta6 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0.beta5 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-7.33.1 spec/helpers/blacklight/layout_helper_behavior_spec.rb
blacklight-8.0.0.beta4 spec/helpers/blacklight/layout_helper_behavior_spec.rb