Commit b0bed714 authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch 'clean-up-clear_status_with_quick_options' into 'master'

Remove clear_status_with_quick_options feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!54820
parents 2fdb7dd6 ea54253a
---
name: clear_status_with_quick_options
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53620
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/320777
milestone: '13.9'
type: development
group: group::optimize
default_enabled: true
...@@ -1071,10 +1071,7 @@ module API ...@@ -1071,10 +1071,7 @@ module API
put "status", feature_category: :users do put "status", feature_category: :users do
forbidden! unless can?(current_user, :update_user_status, current_user) forbidden! unless can?(current_user, :update_user_status, current_user)
update_params = declared_params if ::Users::SetStatusService.new(current_user, declared_params).execute
update_params.delete(:clear_status_after) if Feature.disabled?(:clear_status_with_quick_options, current_user, default_enabled: :yaml)
if ::Users::SetStatusService.new(current_user, update_params).execute
present current_user.status, with: Entities::UserStatus present current_user.status, with: Entities::UserStatus
else else
render_validation_error!(current_user.status) render_validation_error!(current_user.status)
......
...@@ -3044,18 +3044,6 @@ RSpec.describe API::Users do ...@@ -3044,18 +3044,6 @@ RSpec.describe API::Users do
expect(response).to have_gitlab_http_status(:bad_request) expect(response).to have_gitlab_http_status(:bad_request)
end end
context 'when the clear_status_with_quick_options feature flag is disabled' do
before do
stub_feature_flags(clear_status_with_quick_options: false)
end
it 'does not persist clear_status_at' do
put api('/user/status', user), params: { emoji: 'smirk', message: 'hello world', clear_status_after: '3_hours' }
expect(user.status.reload.clear_status_at).to be_nil
end
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment