From 36ccdcc9e12d35399742cbe05c2589d69dbbbc99 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 26 Aug 2024 10:36:31 -0400 Subject: [PATCH] Convert "custom css" controller spec to request spec (#31595) --- .../controllers/custom_css_controller_spec.rb | 19 ------------------- spec/requests/custom_stylesheets_spec.rb | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 spec/controllers/custom_css_controller_spec.rb create mode 100644 spec/requests/custom_stylesheets_spec.rb diff --git a/spec/controllers/custom_css_controller_spec.rb b/spec/controllers/custom_css_controller_spec.rb deleted file mode 100644 index 405fa0bcf3..0000000000 --- a/spec/controllers/custom_css_controller_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe CustomCssController do - render_views - - describe 'GET #show' do - before do - get :show - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it_behaves_like 'cacheable response' - end -end diff --git a/spec/requests/custom_stylesheets_spec.rb b/spec/requests/custom_stylesheets_spec.rb new file mode 100644 index 0000000000..982511297b --- /dev/null +++ b/spec/requests/custom_stylesheets_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'Custom stylesheets' do + describe 'GET /custom.css' do + before { get '/custom.css' } + + it 'returns http success' do + expect(response) + .to have_http_status(200) + .and have_attributes( + content_type: match('text/css') + ) + end + + it_behaves_like 'cacheable response' + end +end