Sha256: 07d2e947b1dc7ae471ef769013562ef0681537966ddf46a5a5d0384dc0422618

Contents?: true

Size: 579 Bytes

Versions: 39

Compression:

Stored size: 579 Bytes

Contents

require 'spec_helper'

describe Kuhsaft::Cms::AdminHelper do
  describe '#render_language_switch?' do
    context 'when there is one language' do
      before do
        I18n.stub(:available_locales).and_return([:de])
      end

      it 'returns false' do
        helper.render_language_switch?.should be_false
      end
    end

    context 'when there are multiple languages' do
      before do
        I18n.stub(:available_locales).and_return([:de, :en])
      end

      it 'returns true' do
        helper.render_language_switch?.should be_true
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
kuhsaft-2.1.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.1.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.8.6 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.8.5 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.0.3 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.0.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.8.4 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.8.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.0.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.0.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.8.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.7.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.7.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.6.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.5.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.4.3 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.4.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.4.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-1.4.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb