Sha256: ae15d3224635fe3c45dc2ef244aa9d4abec434d3e2104cb535594f13b294f7ad
Contents?: true
Size: 1.22 KB
Versions: 4
Compression:
Stored size: 1.22 KB
Contents
require 'spec_helper' describe "Translating process" do def translate_key(key) expect(page).to have_selector("textarea[name='#{key}']") fill_in(key, :with => "translation for #{key}") page.execute_script(%Q{$("textarea[name='#{key}']").blur()}) page.execute_script(%Q{window.location.href='#'}) page.check("show_untranslated") expect(page.find_field(key).value).to eq("translation for #{key}") end before(:each) do visit "/lolita/i18n" end describe "Translating value for default language", :rails => true, :js => true, :redis => true do it "User can translate simple values" do translate_key("en.untranslated_title") end it "User can translate Hash values" do translate_key("en.resource.one") end it "User can translate Array values" do translate_key("en.numbers[0]") end end describe "Translating values for foreign language", :js => true, :redis => true do it "User can translate simple values" do translate_key("lv.untranslated_title") end it "User can translate Hash values" do translate_key("lv.resource.one") end it "User can translate Array values" do translate_key("lv.numbers[0]") end end end
Version data entries
4 entries across 4 versions & 1 rubygems