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/work_items/update_service_spec.rb')
-rw-r--r--spec/services/work_items/update_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/work_items/update_service_spec.rb b/spec/services/work_items/update_service_spec.rb
index 2e0b0051495..e8b82b0b4f2 100644
--- a/spec/services/work_items/update_service_spec.rb
+++ b/spec/services/work_items/update_service_spec.rb
@@ -54,6 +54,12 @@ RSpec.describe WorkItems::UpdateService do
expect(Gitlab::UsageDataCounters::IssueActivityUniqueCounter).to receive(:track_issue_title_changed_action)
expect(update_work_item[:status]).to eq(:success)
end
+
+ it_behaves_like 'issue_edit snowplow tracking' do
+ let(:property) { Gitlab::UsageDataCounters::IssueActivityUniqueCounter::ISSUE_TITLE_CHANGED }
+ let(:user) { current_user }
+ subject(:service_action) { update_work_item[:status] }
+ end
end
context 'when title is not changed' do
@@ -64,6 +70,12 @@ RSpec.describe WorkItems::UpdateService do
expect(Gitlab::UsageDataCounters::WorkItemActivityUniqueCounter).not_to receive(:track_work_item_title_changed_action)
expect(update_work_item[:status]).to eq(:success)
end
+
+ it 'does not emit Snowplow event', :snowplow do
+ expect_no_snowplow_event
+
+ update_work_item
+ end
end
context 'when dates are changed' do