Skip to content

Commit

Permalink
fix: calls _addWebhook function with context
Browse files Browse the repository at this point in the history
  • Loading branch information
d2lam committed Dec 20, 2016
1 parent 740cc57 commit da71192
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ScmBase {
*/
addWebhook(config) {
return validate(config, dataSchema.plugins.scm.addWebhook)
.then(this._addWebhook);
.then(() => this._addWebhook(config));
}

_addWebhook() {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"chai": "^3.5.0",
"eslint": "^3.2.2",
"eslint-config-screwdriver": "^2.0.5",
"jenkins-mocha": "^3.0.4"
"jenkins-mocha": "^4.0.0"
},
"dependencies": {
"joi": "^10.0.5",
"screwdriver-data-schema": "^15.6.0"
"screwdriver-data-schema": "^16.0.2"
}
}
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ describe('index test', () => {
const config = {
scmUri: 'github.com:20161206:branch',
token: 'token',
url: 'https://bob.by/ford'
webhookUrl: 'https://bob.by/ford'
};

it('returns data from underlying method', () => {
Expand All @@ -559,7 +559,7 @@ describe('index test', () => {
return instance.addWebhook({
scmUri: 'github.com:20161206:branch',
token: 'token',
url: 'https://bob.by/ford'
webhookUrl: 'https://bob.by/ford'
}).then((result) => {
assert.strictEqual(result, expectedOutput);
});
Expand Down

0 comments on commit da71192

Please sign in to comment.