debian-mirror-gitlab/spec/services/test_hook_service_spec.rb
2017-08-17 22:00:37 +05:30

14 lines
415 B
Ruby

require 'spec_helper'
describe TestHookService, services: true do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:hook) { create(:project_hook, project: project) }
describe '#execute' do
it "executes successfully" do
stub_request(:post, hook.url).to_return(status: 200)
expect(TestHookService.new.execute(hook, user)).to be_truthy
end
end
end