Sha256: e9e309acef21f963280d5770eda3d2b07c58d47ad4129b7992f7a0468a9df326

Contents?: true

Size: 954 Bytes

Versions: 15

Compression:

Stored size: 954 Bytes

Contents

# frozen_string_literal: true

describe 'spotlight/translations/_import.html.erb', type: :view do
  let(:exhibit) { FactoryBot.create(:exhibit) }

  before do
    allow(view).to receive(:can?).and_return(true)
    allow(view).to receive(:current_exhibit).and_return(exhibit)
    assign(:language, :es)
    I18n.default_locale = 'en'
  end

  it 'has a link to export the translation data' do
    render
    expect(rendered).to have_link 'Export English', href: spotlight.exhibit_translations_path(exhibit_id: exhibit, format: 'yaml', locale: 'en')
    expect(rendered).to have_link 'Export Spanish', href: spotlight.exhibit_translations_path(exhibit_id: exhibit, format: 'yaml', locale: 'es')
  end

  it 'has a form to import the translation data' do
    render
    expect(rendered).to have_selector "form[action='#{spotlight.import_exhibit_translations_path(exhibit_id: exhibit)}']"
    expect(rendered).to have_selector 'input[name="file"]'
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.3.0 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.2.0 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.1.0 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.3 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.2 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.1 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/views/spotlight/translations/_import.html.erb_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/views/spotlight/translations/_import.html.erb_spec.rb