cartodb-4.29/spec/helpers/subdomainless_helper.rb

12 lines
345 B
Ruby
Raw Permalink 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