Sha256: 9cb49838c853be4fa2bf8f7af167acef7f08814155ae93398e15c0b50b6f8933

Contents?: true

Size: 675 Bytes

Versions: 26

Compression:

Stored size: 675 Bytes

Contents

require 'spec_helper'

describe Locomotive::Extensions::Page::Redirect do

  let(:page) { FactoryGirl.build(:page, redirect: true, redirect_url: 'http://www.locomotivecms.com') }

  describe 'redirect option enabled' do

    it 'is valid' do
      page.valid?
      page.errors[:redirect_url].should be_blank
    end

    it 'requires the presence of the redirect url' do
      page.redirect_url = ''
      page.valid?
      page.errors[:redirect_url].should == ["can't be blank"]
    end

    it 'requires the presence of the redirect type' do
      page.redirect_type = ''
      page.valid?
      page.errors[:redirect_type].should == ["can't be blank"]
    end

  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.6 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.6.rc2 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.6.rc1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.5 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.4 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.3 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.2 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.0 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.0.rc3 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.0.rc2 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.5.0.rc1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.4.1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.4.0 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.3.1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.3.0 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.2.3 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.2.2 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.2.1 spec/models/locomotive/extensions/page/redirect_spec.rb