debian-mirror-gitlab/spec/services/test_hook_service_spec.rb

15 lines
403 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
require 'spec_helper'
2015-12-23 02:04:40 +05:30
describe TestHookService, services: true do
2015-09-11 14:41:01 +05:30
let(:user) { create :user }
let(:project) { create :project }
let(:hook) { create :project_hook, project: project }
2014-09-02 18:07:02 +05:30
describe :execute do
it "should execute successfully" do
stub_request(:post, hook.url).to_return(status: 200)
2015-04-26 12:48:37 +05:30
expect(TestHookService.new.execute(hook, user)).to be_truthy
2014-09-02 18:07:02 +05:30
end
end
end