2014-01-15 07:38:50 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2015-12-09 05:55:49 -05:00
|
|
|
describe TestHookService, services: true do
|
2015-06-22 08:39:07 -04:00
|
|
|
let(:user) { create :user }
|
|
|
|
let(:project) { create :project }
|
|
|
|
let(:hook) { create :project_hook, project: project }
|
2014-01-15 07:38:50 -05:00
|
|
|
|
2016-07-11 18:12:31 -04:00
|
|
|
describe '#execute' do
|
2016-08-01 11:00:44 -04:00
|
|
|
it "executes successfully" do
|
2014-01-15 07:38:50 -05:00
|
|
|
stub_request(:post, hook.url).to_return(status: 200)
|
2015-02-12 13:17:35 -05:00
|
|
|
expect(TestHookService.new.execute(hook, user)).to be_truthy
|
2014-01-15 07:38:50 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|