2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
# TODO: Worker can be removed in 13.2:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/218231
|
2019-12-21 20:55:43 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe NewReleaseWorker do
|
|
|
|
let(:release) { create(:release) }
|
|
|
|
|
|
|
|
it 'sends a new release notification' do
|
2020-03-09 13:42:32 +05:30
|
|
|
expect_next_instance_of(NotificationService) do |instance|
|
|
|
|
expect(instance).to receive(:send_new_release_notifications).with(release)
|
|
|
|
end
|
2019-12-21 20:55:43 +05:30
|
|
|
|
|
|
|
described_class.new.perform(release.id)
|
|
|
|
end
|
|
|
|
end
|