Sha256: 4c490e173cb01c120a4e5d3c69facded975fda018763c508f65162a56f420860
Contents?: true
Size: 985 Bytes
Versions: 13
Compression:
Stored size: 985 Bytes
Contents
require 'spec_helper' describe 'Language tree feature', type: :feature, js: true do let(:klingonian) { FactoryGirl.create(:klingonian) } let(:german_root) { FactoryGirl.create(:language_root_page) } let(:klingonian_root) { FactoryGirl.create(:language_root_page, :name => 'Klingonian', :language => klingonian) } before do german_root authorize_as_admin end context "in a multilangual environment" do before { klingonian_root } it "one should be able to switch the language tree" do visit('/admin/pages') page.select 'Klingonian', from: 'language_id' expect(page).to have_selector('#sitemap', text: 'Klingonian') end end context "with no language root page" do before { klingonian } it "it should display the form for creating language root" do visit('/admin/pages') page.select 'Klingonian', from: 'language_id' expect(page).to have_content('This language tree does not exist') end end end
Version data entries
13 entries across 13 versions & 1 rubygems