discourse/spec/controllers/robots_txt_controller_spec.rb

21 lines
453 B
Ruby
Raw Normal View History

require 'rails_helper'
describe RobotsTxtController do
context '.index' do
2013-02-25 23:58:16 +01:00
it "returns index when indexing is allowed" do
2015-06-03 15:44:00 +05:30
SiteSetting.allow_index_in_robots_txt = true
get :index
2015-01-09 14:04:02 -03:00
expect(response).to render_template :index
end
it "returns noindex when indexing is disallowed" do
2015-06-03 15:44:00 +05:30
SiteSetting.allow_index_in_robots_txt = false
get :index
2015-01-09 14:04:02 -03:00
expect(response).to render_template :no_index
2013-02-25 19:42:20 +03:00
end
end
end