0
0
Fork 0

Convert admin/settings/branding spec controller->request (#34130)

This commit is contained in:
Matt Jankowski 2025-03-11 09:32:39 -04:00 committed by GitHub
parent bedf808e02
commit 325b55485e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 25 deletions

View file

@ -1,25 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Admin::Settings::BrandingController do
render_views
describe 'When signed in as an admin' do
before do
sign_in Fabricate(:admin_user), scope: :user
end
describe 'PUT #update' do
it 'cannot create a setting value for a non-admin key' do
expect(Setting.new_setting_key).to be_blank
patch :update, params: { form_admin_settings: { new_setting_key: 'New key value' } }
expect(response)
.to have_http_status(400)
expect(Setting.new_setting_key).to be_nil
end
end
end
end