2016-11-15 04:38:08 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-07-10 10:24:02 -04:00
|
|
|
describe AfterBranchDeleteService do
|
2017-03-27 17:14:01 -04:00
|
|
|
let(:project) { create(:project, :repository) }
|
2016-11-15 04:38:08 -05:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:service) { described_class.new(project, user) }
|
|
|
|
|
|
|
|
describe '#execute' do
|
|
|
|
it 'stops environments attached to branch' do
|
|
|
|
expect(service).to receive(:stop_environments)
|
|
|
|
|
|
|
|
service.execute('feature')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|