mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 00:02:05 -05:00
20 lines
474 B
Ruby
20 lines
474 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
|
|
|
|
end
|
|
end
|