diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 21:10:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 21:10:41 +0300 |
commit | e5f8220301d524167441f8fac5fd5fcf5fc31e1f (patch) | |
tree | 1b73a8c16126db5386b5bae59f61e990a457acc5 /spec/services | |
parent | c60010859638f577dab891358e83945561b35ad2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/work_items/callbacks/notifications_spec.rb (renamed from spec/services/work_items/widgets/notifications_service/update_service_spec.rb) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/work_items/widgets/notifications_service/update_service_spec.rb b/spec/services/work_items/callbacks/notifications_spec.rb index 9615020fe49..2d11dc46fcb 100644 --- a/spec/services/work_items/widgets/notifications_service/update_service_spec.rb +++ b/spec/services/work_items/callbacks/notifications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe WorkItems::Widgets::NotificationsService::UpdateService, feature_category: :team_planning do +RSpec.describe WorkItems::Callbacks::Notifications, feature_category: :team_planning do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project, :private, group: group) } let_it_be(:guest) { create(:user).tap { |u| project.add_guest(u) } } @@ -10,13 +10,13 @@ RSpec.describe WorkItems::Widgets::NotificationsService::UpdateService, feature_ let_it_be_with_reload(:work_item) { create(:work_item, project: project, author: author) } let_it_be(:current_user) { guest } - let(:widget) { work_item.widgets.find { |widget| widget.is_a?(WorkItems::Widgets::Notifications) } } - let(:service) { described_class.new(widget: widget, current_user: current_user) } + let(:widget) { work_item.widgets.find { |widget| widget.is_a?(WorkItems::Callbacks::Notifications) } } + let(:service) { described_class.new(issuable: work_item, current_user: current_user, params: params) } describe '#before_update_in_transaction' do let(:expected) { params[:subscribed] } - subject(:update_notifications) { service.before_update_in_transaction(params: params) } + subject(:update_notifications) { service.before_update } shared_examples 'failing to update subscription' do context 'when user is subscribed with a subscription record' do |