Merge duplicate custom css request specs (#33204)
This commit is contained in:
@@ -10,8 +10,14 @@ RSpec.describe 'Custom CSS' do
|
||||
it 'returns empty stylesheet' do
|
||||
get '/custom.css'
|
||||
|
||||
expect(response.content_type).to include('text/css')
|
||||
expect(response.body.presence).to be_nil
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
.and have_cacheable_headers
|
||||
.and have_attributes(
|
||||
content_type: match('text/css')
|
||||
)
|
||||
expect(response.body.presence)
|
||||
.to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,8 +29,14 @@ RSpec.describe 'Custom CSS' do
|
||||
it 'returns stylesheet from settings' do
|
||||
get '/custom.css'
|
||||
|
||||
expect(response.content_type).to include('text/css')
|
||||
expect(response.body.strip).to eq(expected_css)
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
.and have_cacheable_headers
|
||||
.and have_attributes(
|
||||
content_type: match('text/css')
|
||||
)
|
||||
expect(response.body.strip)
|
||||
.to eq(expected_css)
|
||||
end
|
||||
|
||||
def expected_css
|
||||
@@ -44,8 +56,14 @@ RSpec.describe 'Custom CSS' do
|
||||
it 'returns stylesheet from settings' do
|
||||
get '/custom.css'
|
||||
|
||||
expect(response.content_type).to include('text/css')
|
||||
expect(response.body.strip).to eq(expected_css)
|
||||
expect(response)
|
||||
.to have_http_status(200)
|
||||
.and have_cacheable_headers
|
||||
.and have_attributes(
|
||||
content_type: match('text/css')
|
||||
)
|
||||
expect(response.body.strip)
|
||||
.to eq(expected_css)
|
||||
end
|
||||
|
||||
def expected_css
|
||||
|
||||
Reference in New Issue
Block a user