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