Merge pull request #265 from ZogStriP/robots-txt

corrected spec labels for robots.txt controller
This commit is contained in:
Robin Ward 2013-02-26 07:32:36 -08:00
commit a42637eb73
1 changed files with 4 additions and 3 deletions

View File

@ -3,19 +3,20 @@ require 'spec_helper'
describe RobotsTxtController 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)
get :index
response.should render_template :index
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)
get :index
response.should render_template :no_index
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(:restrict_access).returns(true)
get :index