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