Skip to content

Update app/contexts/test_hook_context.rb

gitlab-qa-bot requested to merge github/fork/p-schneider/patch-1 into master

Created by: p-schneider

"Test Hook" did not work (http://gitlabserver/someproject/hooks/1/test resulting in HTTP 500: Internal Server Error) related to the changes in 7bab81b1.

Before I fixed it I had this error in log/production.log:

Started GET "/someproject/hooks/1/test" for 192.168.1.100 at 2013-02-26 15:24:26 +0100
Processing by HooksController#test as HTML
  Parameters: {"project_id"=>"someproject", "id"=>"1"}
Completed 500 Internal Server Error in 118ms

NoMethodError (undefined method `post_receive_data' for #<Project:0x00000004e1ec28>):
  app/contexts/test_hook_context.rb:5:in `execute'
  app/controllers/hooks_controller.rb:26:in `test'

Merge request reports