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

destroy_service_spec.rb « alerts « prometheus « projects « services « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7205ace830832715fd79b306bbdad4089e728015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

describe Projects::Prometheus::Alerts::DestroyService do
  let_it_be(:project) { create(:project) }
  let_it_be(:user) { create(:user) }
  let_it_be(:alert) { create(:prometheus_alert, project: project) }

  let(:service) { described_class.new(project, user, nil) }

  describe '#execute' do
    subject { service.execute(alert) }

    it 'deletes the alert' do
      expect(subject).to be_truthy

      expect(alert).to be_destroyed
    end
  end
end