cartodb-4.42/spec/helpers/subdomainless_helper.rb
2024-04-06 05:25:13 +00:00

12 lines
345 B
Ruby

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