mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:31:02 +08:00
corrected spec labels
This commit is contained in:
@ -3,19 +3,20 @@ require 'spec_helper'
|
|||||||
describe RobotsTxtController do
|
describe RobotsTxtController do
|
||||||
|
|
||||||
context '.index' do
|
context '.index' do
|
||||||
it "returns noindex when indexing is disallowed" do
|
|
||||||
|
it "returns index when indexing is allowed" do
|
||||||
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
|
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
|
||||||
get :index
|
get :index
|
||||||
response.should render_template :index
|
response.should render_template :index
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns index when indexing is allowed" do
|
it "returns noindex when indexing is disallowed" do
|
||||||
SiteSetting.stubs(:allow_index_in_robots_txt).returns(false)
|
SiteSetting.stubs(:allow_index_in_robots_txt).returns(false)
|
||||||
get :index
|
get :index
|
||||||
response.should render_template :no_index
|
response.should render_template :no_index
|
||||||
end
|
end
|
||||||
|
|
||||||
it "serves it regardless if a site is in private mode" do
|
it "serves noindex when in private mode regardless of the configuration" do
|
||||||
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
|
SiteSetting.stubs(:allow_index_in_robots_txt).returns(true)
|
||||||
SiteSetting.stubs(:restrict_access).returns(true)
|
SiteSetting.stubs(:restrict_access).returns(true)
|
||||||
get :index
|
get :index
|
||||||
|
Reference in New Issue
Block a user