mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 04:07:27 +00:00
FIX: Broken specs
`/u/` is no longer in robots.txt, so don't test for it
This commit is contained in:
parent
b52143feff
commit
f60dc7f5b4
@ -76,7 +76,7 @@ RSpec.describe RobotsTxtController do
|
|||||||
allow_section = allow_index < disallow_index ?
|
allow_section = allow_index < disallow_index ?
|
||||||
response.body[allow_index...disallow_index] : response.body[allow_index..-1]
|
response.body[allow_index...disallow_index] : response.body[allow_index..-1]
|
||||||
|
|
||||||
expect(allow_section).to include('Disallow: /u/')
|
expect(allow_section).to include('Disallow: /auth/')
|
||||||
expect(allow_section).to_not include("Disallow: /\n")
|
expect(allow_section).to_not include("Disallow: /\n")
|
||||||
|
|
||||||
disallowed_section = allow_index < disallow_index ?
|
disallowed_section = allow_index < disallow_index ?
|
||||||
@ -90,7 +90,7 @@ RSpec.describe RobotsTxtController do
|
|||||||
|
|
||||||
i = response.body.index('User-agent: *')
|
i = response.body.index('User-agent: *')
|
||||||
expect(i).to be_present
|
expect(i).to be_present
|
||||||
expect(response.body[i..-1]).to include("Disallow: /u/")
|
expect(response.body[i..-1]).to include("Disallow: /auth/")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can whitelist user agents" do
|
it "can whitelist user agents" do
|
||||||
@ -131,7 +131,7 @@ RSpec.describe RobotsTxtController do
|
|||||||
SiteSetting.allow_index_in_robots_txt = false
|
SiteSetting.allow_index_in_robots_txt = false
|
||||||
get '/robots.txt'
|
get '/robots.txt'
|
||||||
|
|
||||||
expect(response.body).to_not include("Disallow: /u/")
|
expect(response.body).to_not include("Disallow: /auth/")
|
||||||
expect(response.body).to include("User-agent: googlebot\nAllow")
|
expect(response.body).to include("User-agent: googlebot\nAllow")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user