FEATURE: allows to to style published page with themes/plugins (#9570)

This commit is contained in:
Joffrey JAFFEUX
2020-04-28 18:24:24 +02:00
committed by GitHub
parent b19dcac272
commit a6f986b50f
8 changed files with 64 additions and 30 deletions

View File

@@ -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