spec/unit/entities/page_spec.rb in locomotivecms_steam-1.3.0.rc1 vs spec/unit/entities/page_spec.rb in locomotivecms_steam-1.3.0.rc2

- old
+ new

@@ -80,6 +80,30 @@ it { is_expected.to eq 'template code here'} end + describe '#redirect?' do + + subject { page.redirect? } + + it { is_expected.to eq false } + + context 'redirect_url has been set' do + + let(:attributes) { { redirect: nil, redirect_url: 'http://www.google.fr' } } + + it { is_expected.to eq true } + + context 'but redirect is set to false' do + + let(:attributes) { { redirect: false, redirect_url: 'http://www.google.fr' } } + + it { is_expected.to eq false } + + end + + end + + end + end