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