about summary refs log tree commit diff
path: root/spec/controllers/admin
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r--spec/controllers/admin/settings_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/admin/settings_controller_spec.rb b/spec/controllers/admin/settings_controller_spec.rb
index 533ae2045..7fd49a0f1 100644
--- a/spec/controllers/admin/settings_controller_spec.rb
+++ b/spec/controllers/admin/settings_controller_spec.rb
@@ -5,10 +5,6 @@ require 'rails_helper'
 RSpec.describe Admin::SettingsController, type: :controller do
   render_views
 
-  before do
-    Rails.cache.clear
-  end
-
   describe 'When signed in as an admin' do
     before do
       sign_in Fabricate(:user, admin: true), scope: :user
@@ -24,12 +20,16 @@ RSpec.describe Admin::SettingsController, type: :controller do
 
     describe 'PUT #update' do
       describe 'for a record that doesnt exist' do
-        after do
+        around do |example|
+          before = Setting.site_extended_description
+          Setting.site_extended_description = nil
+          example.run
+          Setting.site_extended_description = before
           Setting.new_setting_key = nil
         end
 
         it 'cannot create a setting value for a non-admin key' do
-          expect(Setting.new_setting_key).to be_nil
+          expect(Setting.new_setting_key).to be_blank
 
           patch :update, params: { new_setting_key: 'New key value' }