Sha256: cb6850b64ed71342ba88a0d225d1ed6ce2db15d3041efa1dab8dbebd1a5c912a

Contents?: true

Size: 1.2 KB

Versions: 22

Compression:

Stored size: 1.2 KB

Contents

# frozen_string_literal: true

describe 'spotlight/contacts/edit.html.erb' do
  let(:exhibit) { FactoryBot.create(:exhibit) }

  let(:contact) do
    Spotlight::Contact.new exhibit: exhibit
  end

  before do
    allow(view).to receive(:exhibit_contacts_path).and_return('/exhibit/1/contacts')
    allow(view).to receive(:exhibit_about_pages_path).and_return('/exhibit/admin/about')
    allow(view).to receive(:contact_images_path).and_return('/contact_images')
    assign(:contact, contact)
    assign(:exhibit, exhibit)
    allow(view).to receive(:current_exhibit).and_return(exhibit)
    # Assumes that the second backend is the "Simple"
    I18n.backend.backends.second.store_translations(
      :en,
      spotlight: {
        contacts: {
          form: {
            new_field: {
              placeholder: 'place'
            },
            source: {
              remote: {
                help: 'Help!'
              }
            }
          }
        }
      }
    )
  end

  it 'has an IIIF crop' do
    render
    expect(rendered).to have_content 'Upload an image'
    expect(rendered).to have_css '.form-text', text: 'Help!'
    expect(rendered).to have_selector '#contact_avatar_attributes_iiif_cropper'
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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