Sha256: bec7d0aa9f9d516f20a3c7ae57ac3b42e7cad0c41e226e5a5a63fcb6f5736d27

Contents?: true

Size: 940 Bytes

Versions: 22

Compression:

Stored size: 940 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/featured_images/_form', type: :view do
  let(:exhibit) { FactoryBot.create(:exhibit, :with_thumbnail) }
  let(:builder) { ActionView::Helpers::FormBuilder.new 'z', exhibit.thumbnail, view, {} }

  before do
    assign(:exhibit, exhibit)
    allow(builder).to receive_messages(file_field_without_bootstrap: nil)
    allow(view).to receive_messages(exhibit_thumbnails_path: nil)
    I18n.backend.backends.second.store_translations(
      :en,
      spotlight: {
        featured_images: {
          form: {
            source: {
              remote: {
                help: 'Help!'
              }
            }
          }
        }
      }
    )
  end

  it 'has help block' do
    render partial: 'spotlight/featured_images/form',
           locals: { f: builder, initial_crop_selection: [], crop_type: :thumbnail }
    expect(rendered).to have_css '.form-text', text: 'Help!'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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