summaryrefslogtreecommitdiff
path: root/spec/services/keys/destroy_service_spec.rb
blob: 9f064cb72368bf633102777131f4b529cff0060d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Keys::DestroyService, feature_category: :source_code_management do
  let(:user) { create(:user) }

  subject { described_class.new(user) }

  it 'destroys a key' do
    key = create(:personal_key)

    expect { subject.execute(key) }.to change(Key, :count).by(-1)
  end
end