Fix handling of multi-part branches in the build triggers

Fixes #1360
This commit is contained in:
Joseph Schorr 2016-07-26 13:41:13 -07:00
parent 9d48bcd0f1
commit 06d52f2c83
7 changed files with 232 additions and 21 deletions

View file

@ -207,6 +207,27 @@ class TestPrepareTrigger(unittest.TestCase):
self.assertSchema('bitbucket_webhook', expected, bb_webhook)
def test_github_webhook_payload_slash_branch(self):
expected = {
'commit': u'410f4cdf8ff09b87f245b13845e8497f90b90a4c',
'ref': u'refs/heads/slash/branch',
'git_url': u'git@github.com:josephschorr/anothertest.git',
'commit_info': {
'url': u'https://github.com/josephschorr/anothertest/commit/410f4cdf8ff09b87f245b13845e8497f90b90a4c',
'date': u'2015-09-11T14:26:16-04:00',
'message': u'Update Dockerfile',
'committer': {
'username': u'josephschorr',
},
'author': {
'username': u'josephschorr',
},
},
}
self.assertSchema('github_webhook_slash_branch', expected, gh_webhook)
def test_github_webhook_payload(self):
expected = {
'commit': u'410f4cdf8ff09b87f245b13845e8497f90b90a4c',