2019-04-11 08:17:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-16 14:26:22 -04:00
|
|
|
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
|