debian-mirror-gitlab/spec/services/keys/destroy_service_spec.rb
2019-07-31 17:26:46 +00:00

15 lines
285 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe Keys::DestroyService do
let(:user) { create(:user) }
subject { described_class.new(user) }
it 'destroys a key' do
key = create(:key)
expect { subject.execute(key) }.to change(Key, :count).by(-1)
end
end