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