From a52890a24a0b8de98b8ff7da8b8bbab907918a67 Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 21 Nov 2024 16:12:03 +0000 Subject: [PATCH] save role info --- app/controllers/settings/users_controller.rb | 3 ++- spec/requests/settings/users_spec.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/settings/users_controller.rb b/app/controllers/settings/users_controller.rb index 94b555102..2e5967528 100644 --- a/app/controllers/settings/users_controller.rb +++ b/app/controllers/settings/users_controller.rb @@ -33,7 +33,8 @@ def get_user def user_params params.require(:user).permit( :email, - :username + :username, + role_ids: [] ) end end diff --git a/spec/requests/settings/users_spec.rb b/spec/requests/settings/users_spec.rb index 64e063350..0ab447eff 100644 --- a/spec/requests/settings/users_spec.rb +++ b/spec/requests/settings/users_spec.rb @@ -27,6 +27,7 @@ expect(response).to be_successful end end + describe "PATCH /update", :as_moderator do let(:user) { create(:user) } @@ -53,5 +54,4 @@ end end end - end