mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allows to to style published page with themes/plugins (#9570)
This commit is contained in:
@@ -76,9 +76,21 @@ RSpec.describe PublishedPagesController do
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
|
||||
it "returns 200 for a valid article" do
|
||||
get published_page.path
|
||||
expect(response.status).to eq(200)
|
||||
context "the article is valid" do
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
published_page.topic.tags = [Fabricate(:tag, name: "recipes")]
|
||||
end
|
||||
|
||||
it "returns 200" do
|
||||
get published_page.path
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
||||
it "defines correct css classes on body" do
|
||||
get published_page.path
|
||||
expect(response.body).to include("<body class=\"published-page published-page-test topic-#{published_page.topic_id} recipes uncategorized\">")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user