diff options
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index c93e6aafd75..3089afd8d8a 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -199,6 +199,13 @@ describe Namespace do expect(described_class.find_by_pages_host(host)).to eq(namespace) end + + it "returns no result if the provided host is not subdomain of the Pages host" do + create(:namespace, name: 'namespace.io') + host = "namespace.io" + + expect(described_class.find_by_pages_host(host)).to eq(nil) + end end describe '#ancestors_upto' do |