Add Boards::DestroyService service to remove boards

parent f6afee49
module Boards
class DestroyService < Boards::BaseService
def execute(board)
board.destroy
end
end
end
require 'spec_helper'
describe Boards::DestroyService, services: true do
describe '#execute' do
it 'removes board from project' do
project = create(:empty_project)
board = create(:board, project: project)
service = described_class.new(project, double)
expect { service.execute(board) }.to change(project.boards, :count).by(-1)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment