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.2.0 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.1.4 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.1.3 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.1.2 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.1.1 spec/models/locomotive/extensions/page/redirect_spec.rb
locomotive_cms-2.1.0 spec/models/locomotive/extensions/page/redirect_spec.rb