Sha256: ec5e3cb94db6648259a3781933c51d478adcf16412230d07315d98fe021bde04
Contents?: true
Size: 996 Bytes
Versions: 18
Compression:
Stored size: 996 Bytes
Contents
require 'spec_helper' describe Locomotive::Concerns::Site::UrlRedirections do let(:redirections) { {} } let(:site) { build(:site, url_redirections: redirections) } describe '#url_redirections=' do subject { site.url_redirections } describe 'passing nil' do let(:redirections) { nil } it { is_expected.to eq([]) } end describe 'passing an array' do let(:redirections) { [['/foo', '/bar'], ['/hello_world', '/hello-world']] } it { is_expected.to eq([['/foo', '/bar'], ['/hello_world', '/hello-world']]) } end describe 'passing a flatten array' do let(:redirections) { ['/foo', '/bar', '/hello_world', '/hello-world'] } it { is_expected.to eq([['/foo', '/bar'], ['/hello_world', '/hello-world']]) } end describe 'make sure a leading "/" character is present' do let(:redirections) { ['hello_world', 'hello-world'] } it { is_expected.to eq([['/hello_world', '/hello-world']]) } end end end
Version data entries
18 entries across 18 versions & 1 rubygems