Commit 47b30b7c authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'ali/move-expectation-out-of-before-block' into 'master'

Move expectation out of `before` block

See merge request gitlab-org/gitlab!56268
parents c362fcab 3eb19284
......@@ -63,9 +63,6 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
before do
subject.execute(issue)
expect_snowplow_event(category: 'epics', action: 'promote', property: 'issue_id', value: issue.id,
project: project, user: user, namespace: group)
end
it 'creates a new epic with correct attributes' do
......@@ -97,6 +94,11 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
expect(issue.promoted_to_epic).to eq(epic)
end
it 'emits a snowplow event' do
expect_snowplow_event(category: 'epics', action: 'promote', property: 'issue_id', value: issue.id,
project: project, user: user, namespace: group)
end
context 'when issue description has mentions and has notes with mentions' do
let(:issue) { create(:issue, project: project, description: "description with mention to #{user.to_reference}") }
......
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