diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-15 14:38:50 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-15 14:38:50 +0200 |
commit | 8bfc62fb8b02bde7da97958deb8aeda63581bfce (patch) | |
tree | 1ccb80a7780a4d7b888070c690276bf6271d8989 /spec | |
parent | 37ef33cba18f947699fc3f285397be34861ab51e (diff) | |
download | gitlab-ce-8bfc62fb8b02bde7da97958deb8aeda63581bfce.tar.gz |
Convert TestHookContext into TestHookService. Added tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/test_hook_service_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/test_hook_service_spec.rb b/spec/services/test_hook_service_spec.rb new file mode 100644 index 00000000000..fbe9066096d --- /dev/null +++ b/spec/services/test_hook_service_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +describe TestHookService do + let (:user) { create :user } + let (:project) { create :project_with_code } + let (:hook) { create :project_hook, project: project } + + describe :execute do + it "should execute successfully" do + stub_request(:post, hook.url).to_return(status: 200) + TestHookService.new.execute(hook, user).should be_true + end + end +end |