cartodb/spec/helpers/subdomainless_helper.rb

12 lines
345 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
def stub_domainful(subdomain)
CartoDB.stubs(:session_domain).returns('.localhost.lan')
CartoDB.stubs(:subdomainless_urls?).returns(false)
host! "#{subdomain}.localhost.lan"
end
def stub_subdomainless
CartoDB.stubs(:session_domain).returns('localhost.lan')
CartoDB.stubs(:subdomainless_urls?).returns(true)
host! "localhost.lan"
end