Sha256: e9126288b272bbf41fe956136f30851026fde5fc99d8c67e8b93afa6f91ac792
Contents?: true
Size: 1.17 KB
Versions: 6
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe "Translation integration" do context "in admin backend" do before do authorize_as_admin end it "should be possible to set the locale of the admin backend via params" do visit admin_dashboard_path(:locale => :de) page.should have_content('Willkommen') end it "should store the current locale in the session" do visit admin_dashboard_path(:locale => :de) visit admin_dashboard_path page.should have_content('Willkommen') end it "should be possible to change the current locale in the session" do visit admin_dashboard_path(:locale => :de) visit admin_dashboard_path(:locale => :en) page.should have_content('Welcome') end it "should not be possible to switch the locale of the admin backend to an unknown locale" do visit admin_dashboard_path(:locale => :ko) page.should have_content('Welcome') end it "should use the current users language setting if no other parameter is given" do Alchemy::User.first.update_attributes(:language => :de) visit admin_dashboard_path page.should have_content('Willkommen') end end end
Version data entries
6 entries across 6 versions & 1 rubygems