Sha256: 01f1f92374b9f4d72f5a750f7cebb39bef94e9d1ddab36545937bb999928cc3a

Contents?: true

Size: 962 Bytes

Versions: 15

Compression:

Stored size: 962 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/featured_images/_upload_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: {
          upload_form: {
            source: {
              remote: {
                help: 'Help!'
              }
            }
          }
        }
      }
    )
  end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.13.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.12.1 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.12.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.11.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.10.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.9.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.8.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.7.2 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.7.1 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.7.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.6.1.1 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.6.1 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb
blacklight-spotlight-2.6.0 spec/views/spotlight/featured_images/_upload_form.html.erb_spec.rb