mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 04:36:32 +08:00
![Phil Pirozhkov](/assets/img/avatar_default.png)
* Remove outdated option
04078317ba
* Use the non-globally exposed RSpec syntax
https://github.com/rspec/rspec-core/pull/2803
* Use the non-globally exposed RSpec syntax, cont
https://github.com/rspec/rspec-core/pull/2803
* Comply to strict predicate matchers
See:
- https://github.com/rspec/rspec-expectations/pull/1195
- https://github.com/rspec/rspec-expectations/pull/1196
- https://github.com/rspec/rspec-expectations/pull/1277
19 lines
645 B
Ruby
19 lines
645 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rails_helper"
|
|
|
|
RSpec.describe "list/list.erb" do
|
|
fab!(:category) { Fabricate(:category) }
|
|
|
|
it "add nofollow to RSS alternate link for category" do
|
|
view.stubs(:include_crawler_content?).returns(false)
|
|
view.stubs(:url_for).returns('https://www.example.com/test.rss')
|
|
view.instance_variable_set("@rss", false)
|
|
view.instance_variable_set("@category", category)
|
|
render template: 'list/list', formats: []
|
|
|
|
expect(view.content_for(:head)).to match(/<link rel="alternate nofollow" type="application\/rss\+xml" title="[^"]+" href="https:\/\/www.example.com\/test\.rss" \/>/)
|
|
end
|
|
|
|
end
|