Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/notes/destroy_service_spec.rb')
-rw-r--r--spec/services/notes/destroy_service_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/services/notes/destroy_service_spec.rb b/spec/services/notes/destroy_service_spec.rb
index 744808525f5..396e23351c9 100644
--- a/spec/services/notes/destroy_service_spec.rb
+++ b/spec/services/notes/destroy_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Notes::DestroyService do
+RSpec.describe Notes::DestroyService, feature_category: :team_planning do
let_it_be(:project) { create(:project, :public) }
let_it_be(:issue) { create(:issue, project: project) }
@@ -38,7 +38,9 @@ RSpec.describe Notes::DestroyService do
.and_call_original
expect do
service_action
- end.to change { counter.unique_events(event_names: property, start_date: 1.day.ago, end_date: 1.day.from_now) }.by(1)
+ end.to change {
+ counter.unique_events(event_names: property, start_date: Date.today.beginning_of_week, end_date: 1.week.from_now)
+ }.by(1)
end
it_behaves_like 'issue_edit snowplow tracking' do
@@ -94,8 +96,12 @@ RSpec.describe Notes::DestroyService do
it 'tracks design comment removal' do
note = create(:note_on_design, project: project)
- expect(Gitlab::UsageDataCounters::IssueActivityUniqueCounter).to receive(:track_issue_design_comment_removed_action).with(author: note.author,
- project: project)
+ expect(Gitlab::UsageDataCounters::IssueActivityUniqueCounter).to receive(
+ :track_issue_design_comment_removed_action
+ ).with(
+ author: note.author,
+ project: project
+ )
described_class.new(project, user).execute(note)
end