Skip to content

Commit 98d75f0

Browse files
committed
Add test for Github Enterprise support
1 parent 00a20d1 commit 98d75f0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/github-client.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,29 @@ describe('GithubClient', function () {
178178
})
179179
})
180180
})
181+
182+
describe('Github Enterprise support', function () {
183+
before(function () {
184+
this.client = new GithubClient({
185+
owner: 'uiureo',
186+
repo: 'awesome-app',
187+
token: 'token',
188+
endpoint: 'https://ghe.big.company/api/v2'
189+
})
190+
})
191+
192+
describe('#prepareReleasePR()', function () {
193+
nock('https://ghe.big.company')
194+
.post('/api/v2/repos/uiureo/awesome-app/pulls')
195+
.reply(201, {
196+
number: 42
197+
})
198+
199+
it('creates pr', function (done) {
200+
this.client.prepareReleasePR().then(function (pr) {
201+
assert(pr.number === 42)
202+
done()
203+
}).catch(done)
204+
})
205+
})
206+
})

0 commit comments

Comments
 (0)