mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
1221c393a3
Conflicts: lib/oneboxer.rb lib/oneboxer/whitelist.rb spec/controllers/robots_txt_controller_spec.rb
27 lines
750 B
Ruby
27 lines
750 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
|
|
response.should render_template :index
|
|
end
|
|
|
|
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 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
|
|
response.should render_template :no_index
|
|
end
|
|
|
|
end
|
|
end
|