2014-01-15 12:38:50 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe TestHookService do
|
|
|
|
let (:user) { create :user }
|
2014-01-22 19:03:52 +00:00
|
|
|
let (:project) { create :project }
|
2014-01-15 12:38:50 +00:00
|
|
|
let (:hook) { create :project_hook, project: project }
|
|
|
|
|
|
|
|
describe :execute do
|
|
|
|
it "should execute successfully" do
|
|
|
|
stub_request(:post, hook.url).to_return(status: 200)
|
2015-02-12 18:17:35 +00:00
|
|
|
expect(TestHookService.new.execute(hook, user)).to be_truthy
|
2014-01-15 12:38:50 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|