Sha256: 6ba83bea20714bc170114f80adbbeeb491be90b7a982a123457aadfc38e9d11e
Contents?: true
Size: 893 Bytes
Versions: 11
Compression:
Stored size: 893 Bytes
Contents
shared_examples 'translates an image' do before do allow(Refinery::I18n).to receive(:frontend_locales).and_return([:en, :fr]) ensure_on(initial_path) end context "when in list view" do before do ensure_on(current_path + "?view=list") end it "can have a second locale added to it" do expect(page).to have_content("Beach") expect(page).to have_selector("a[href='/refinery/images/#{image.id}/edit']") click_link "Edit this image" within "#switch_locale_picker" do click_link "FR" end fill_in "Title", :with => "Titre de la première image" fill_in "Alt", :with => "Texte alternatif de la première image" click_button "Save" expect(page).to have_content("'Titre de la première image' was successfully updated.") expect(Refinery::Image.translation_class.count).to eq(1) end end end
Version data entries
11 entries across 11 versions & 1 rubygems