Sha256: 6e975dbe4ff052fa8c9a3c6ef1538c48970bf4854d5bdbfafce2569e0113110d
Contents?: true
Size: 688 Bytes
Versions: 12
Compression:
Stored size: 688 Bytes
Contents
require 'spec_helper' describe Locomotive::Concerns::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? expect(page.errors[:redirect_url]).to be_blank end it 'requires the presence of the redirect url' do page.redirect_url = '' page.valid? expect(page.errors[:redirect_url]).to eq(["can't be blank"]) end it 'requires the presence of the redirect type' do page.redirect_type = '' page.valid? expect(page.errors[:redirect_type]).to eq(["can't be blank"]) end end end
Version data entries
12 entries across 12 versions & 1 rubygems