discourse-docs/spec/requests/robots_txt_controller_spec.rb
Jarek Radosz dea819cca4
DEV: Update linting and add types (#223)
* DEV: Update linting and add types

* DEV: Update linting and add types

* DEV: Update linting and add types
2026-01-28 11:49:15 +00:00

15 lines
372 B
Ruby

# frozen_string_literal: true
describe RobotsTxtController do
before do
SiteSetting.docs_enabled = true
GlobalSetting.stubs(:docs_path).returns("docs")
end
it "adds /docs/ to robots.txt" do
get "/robots.txt"
expect(response.body).to include("User-agent: *")
expect(response.body).to include("Disallow: /#{GlobalSetting.docs_path}/")
end
end