Commit 3eb19284 authored by Alishan Ladhani's avatar Alishan Ladhani

Move expectation out of `before` block

parent 9a0212d1
...@@ -63,9 +63,6 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do ...@@ -63,9 +63,6 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
before do before do
subject.execute(issue) subject.execute(issue)
expect_snowplow_event(category: 'epics', action: 'promote', property: 'issue_id', value: issue.id,
project: project, user: user, namespace: group)
end end
it 'creates a new epic with correct attributes' do it 'creates a new epic with correct attributes' do
...@@ -97,6 +94,11 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do ...@@ -97,6 +94,11 @@ RSpec.describe Epics::IssuePromoteService, :aggregate_failures do
expect(issue.promoted_to_epic).to eq(epic) expect(issue.promoted_to_epic).to eq(epic)
end 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 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}") } 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