Sha256: 9cbecdc97399fdc6488ad27f40b41292453937875abf6270ed3831d167bfe52c

Contents?: true

Size: 770 Bytes

Versions: 18

Compression:

Stored size: 770 Bytes

Contents

require 'spec_helper'

module Alchemy
  describe PageLayout do

    describe ".all" do

      it "should return all page_layouts" do
        layouts = PageLayout.all
        layouts.should be_instance_of(Array)
        layouts.collect { |l| l['name'] }.should include('standard')
      end

    end

    describe '.layouts_with_own_for_select' do

      it "should not hold a layout twice" do
        layouts = PageLayout.layouts_with_own_for_select('standard', 1, false)
        layouts = layouts.collect(&:last)
        layouts.select { |l| l == "standard" }.length.should == 1
      end

    end

    it "should not display hidden page layouts" do
      PageLayout.selectable_layouts(Language.get_default).each { |e| e["hide"].should_not == true }
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
alchemy_cms-2.6.0.rc5 spec/models/page_layout_spec.rb
alchemy_cms-2.5.3.1 spec/models/page_layout_spec.rb
alchemy_cms-2.5.3 spec/models/page_layout_spec.rb
alchemy_cms-2.5.2.2 spec/models/page_layout_spec.rb
alchemy_cms-2.5.2.1 spec/models/page_layout_spec.rb
alchemy_cms-2.5.2 spec/models/page_layout_spec.rb
alchemy_cms-2.5.1 spec/models/page_layout_spec.rb
alchemy_cms-2.5.0 spec/models/page_layout_spec.rb
alchemy_cms-2.5.0.rc3 spec/models/page_layout_spec.rb
alchemy_cms-2.5.0.b9 spec/models/page_layout_spec.rb
alchemy_cms-2.4.1 spec/models/page_layout_spec.rb
alchemy_cms-2.5.0.b5 spec/models/page_layout_spec.rb
alchemy_cms-2.5.0.b2 spec/models/page_layout_spec.rb
alchemy_cms-2.4.0 spec/models/page_layout_spec.rb
alchemy_cms-2.4.rc4 spec/models/page_layout_spec.rb
alchemy_cms-2.4.rc2 spec/models/page_layout_spec.rb
alchemy_cms-2.4.rc1 spec/models/page_layout_spec.rb
alchemy_cms-2.4.beta2 spec/models/page_layout_spec.rb