FEATURE: Add welcome message for admins. (#8293)

This commit is contained in:
Vinoth Kannan
2019-11-05 18:15:55 +05:30
committed by GitHub
parent ee5799805c
commit 671f303b53
6 changed files with 21 additions and 9 deletions

View File

@ -426,6 +426,7 @@ RSpec.describe Admin::UsersController do
end
it 'updates the moderator flag' do
Jobs.expects(:enqueue).with(:send_system_message, user_id: another_user.id, message_type: 'welcome_staff', message_options: { role: :moderator })
put "/admin/users/#{another_user.id}/grant_moderation.json"
expect(response.status).to eq(200)
another_user.reload