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

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

require 'spec_helper'

RSpec.describe ProtectedTags::DestroyService do
  let(:protected_tag) { create(:protected_tag) }
  let(:project) { protected_tag.project }
  let(:user) { project.owner }

  describe '#execute' do
    subject(:service) { described_class.new(project, user) }

    it 'destroy a protected tag' do
      service.execute(protected_tag)

      expect(protected_tag).to be_destroyed
    end
  end
end