Sha256: 3959c366cf4ce48a24dfea9ccfa8d9d2c753cf56ca01f221ae607b5f8b0e4171

Contents?: true

Size: 573 Bytes

Versions: 11

Compression:

Stored size: 573 Bytes

Contents

require 'spec_helper'

describe CmsHelper do
  context 'when the user creates a toplevel page' do
    describe '#available_parent_pages' do
      it 'should return the 2 pages' do
        helper.available_parent_pages.should have(2).pages
      end
    end  
  end
  
  describe '#available_parent_pages' do
    before do
      page1, page2, page3 = create_page_tree
      helper.stub!(:params).and_return(:parent_id => page3.id)
    end    
    
    it 'should return the parent pages' do
      helper.available_parent_pages.should have_at_least(3).pages
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kuhsaft-0.3.4.legacy3 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.4.legacy2 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.4.legacy spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.6 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.5 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.4 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.4.rc2 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.4.rc1 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.3 spec/helpers/cms_helper_spec.rb
kuhsaft-0.3.2 spec/helpers/cms_helper_spec.rb
kuhsaft-0.2.5 spec/helpers/cms_helper_spec.rb