mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 10:15:48 +08:00
21 lines
482 B
Ruby
21 lines
482 B
Ruby
require 'spec_helper'
|
|
|
|
describe RobotsTxtController do
|
|
|
|
context '.index' do
|
|
|
|
it "returns index when indexing is allowed" do
|
|
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
|
|
get :index
|
|
expect(response).to render_template :index
|
|
end
|
|
|
|
it "returns noindex when indexing is disallowed" do
|
|
SiteSetting.stubs(:allow_index_in_robots_txt).returns(false)
|
|
get :index
|
|
expect(response).to render_template :no_index
|
|
end
|
|
|
|
end
|
|
end
|