6d81905faf
Signed-off-by: Rémy Coutable <remy@rymai.me>
13 lines
254 B
Ruby
13 lines
254 B
Ruby
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
|