spec/unit/entities/page_spec.rb in locomotivecms_steam-1.0.0.pre.beta.3 vs spec/unit/entities/page_spec.rb in locomotivecms_steam-1.0.0.rc1
- old
+ new
@@ -51,6 +51,30 @@
let(:attributes) { { target_klass_name: 'Locomotive::ContentEntryBigNumber' } }
it { is_expected.to eq 'BigNumber' }
end
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