2020-06-22 08:08:47 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-26 05:08:59 -04:00
|
|
|
RSpec.describe GpgKeys::DestroyService do
|
2020-06-22 08:08:47 -04:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
subject { described_class.new(user) }
|
|
|
|
|
|
|
|
it 'destroys the GPG key' do
|
|
|
|
gpg_key = create(:gpg_key)
|
|
|
|
|
|
|
|
expect { subject.execute(gpg_key) }.to change(GpgKey, :count).by(-1)
|
|
|
|
end
|
|
|
|
end
|