mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:11:58 +08:00
add missing test for rel next/prev
This commit is contained in:
@ -125,34 +125,6 @@ describe TopicsController do
|
||||
end
|
||||
end
|
||||
|
||||
describe "crawler" do
|
||||
render_views
|
||||
|
||||
context "when not a crawler" do
|
||||
it "renders with the application layout" do
|
||||
get :show, params: { topic_id: topic.id, slug: topic.slug }
|
||||
|
||||
body = response.body
|
||||
|
||||
expect(body).to have_tag(:script, with: { src: '/assets/application.js' })
|
||||
expect(body).to have_tag(:meta, with: { name: 'fragment' })
|
||||
end
|
||||
end
|
||||
|
||||
context "when a crawler" do
|
||||
it "renders with the crawler layout" do
|
||||
request.env["HTTP_USER_AGENT"] = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
get :show, params: { topic_id: topic.id, slug: topic.slug }
|
||||
|
||||
body = response.body
|
||||
|
||||
expect(body).to have_tag(:body, with: { class: 'crawler' })
|
||||
expect(body).to_not have_tag(:meta, with: { name: 'fragment' })
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "print" do
|
||||
render_views
|
||||
|
||||
|
Reference in New Issue
Block a user