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

15 lines
399 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
2016-08-24 12:49:21 +05:30
describe '#execute' do
2016-09-13 17:45:13 +05:30
it "executes successfully" do
2014-09-02 18:07:02 +05:30
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