2020-10-14 10:29:40 -04:00
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2022-07-27 22:27:38 -04:00
|
|
|
|
RSpec.describe "Styleguide assets" do
|
2020-10-14 10:29:40 -04:00
|
|
|
|
before do
|
|
|
|
|
SiteSetting.styleguide_enabled = true
|
|
|
|
|
sign_in(Fabricate(:admin))
|
|
|
|
|
end
|
|
|
|
|
|
2022-07-27 12:14:14 -04:00
|
|
|
|
context "when visiting homepage" do
|
2020-10-14 10:29:40 -04:00
|
|
|
|
it "doesn’t load styleguide assets" do
|
|
|
|
|
get "/"
|
|
|
|
|
expect(response.body).to_not include("styleguide")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2022-07-27 12:14:14 -04:00
|
|
|
|
context "when visiting styleguide" do
|
2020-10-14 10:29:40 -04:00
|
|
|
|
it "loads styleguide assets" do
|
|
|
|
|
get "/styleguide"
|
|
|
|
|
expect(response.body).to include("styleguide")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|