Sha256: b2caf30fe3ccdc2646d4af69c5bde8c7113d1611d92ae365e2b2e2b67e17c65e
Contents?: true
Size: 763 Bytes
Versions: 13
Compression:
Stored size: 763 Bytes
Contents
require 'spec_helper' describe 'Locale select' do let(:a_page) { FactoryGirl.create(:public_page) } before do allow(Alchemy::I18n).to receive(:translation_files).and_return ['alchemy.kl.yml', 'alchemy.jp.yml', 'alchemy.cz.yml'] authorize_as_admin end it "contains all locales in a selectbox" do visit admin_dashboard_path expect(page).to have_select('change_locale', options: ['Kl', 'Jp', 'Cz']) end context 'when having available_locales set for Alchemy::I18n' do before do allow(Alchemy::I18n).to receive(:available_locales).and_return [:jp, :cz] end it "provides only that locales" do visit admin_dashboard_path expect(page).to have_select('change_locale', options: ['Jp', 'Cz']) end end end
Version data entries
13 entries across 13 versions & 1 rubygems