This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/robots_txt_controller_spec.rb
2016-03-31 17:40:54 -04:00

20 lines
453 B
Ruby

require 'rails_helper'
describe RobotsTxtController do
context '.index' do
it "returns index when indexing is allowed" do
SiteSetting.allow_index_in_robots_txt = true
get :index
expect(response).to render_template :index
end
it "returns noindex when indexing is disallowed" do
SiteSetting.allow_index_in_robots_txt = false
get :index
expect(response).to render_template :no_index
end
end
end