Skip to content

Commit

Permalink
Fix and re-enable broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-mc committed Feb 8, 2019
1 parent 6b7bf6b commit b710d77
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions src/tests/server/api/cla.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,19 +500,28 @@ describe('', function () {
sinon.assert.calledWithMatch(cla.sign, expArgs.claSign);
});

xit('should update status of all open pull requests for the repo if user model has no requests stored', async function () {
it('should update status of all open pull requests for the repo if user model has no requests stored', async function () {
testUser.requests = undefined;
this.timeout(100);
try {
const res = await cla_api.sign(req);

const res = await cla_api.sign(req);

assert.ok(res);
sinon.assert.calledWithMatch(cla.sign, expArgs.claSign);
assert(github.call.calledWithMatch({
obj: 'pullRequests',
fun: 'getAll'
}));
assert(prService.editComment.called);
assert.equal(statusService.update.callCount, 2);
return new Promise((resolve) => {
setTimeout(function () {
assert.ok(res);
sinon.assert.calledWithMatch(cla.sign, expArgs.claSign);
assert(github.call.calledWithMatch({
obj: 'pullRequests',
fun: 'getAll'
}));
assert(prService.editComment.called);
assert.equal(statusService.update.callCount, 2);
resolve();
}, 50);
});
} catch (e) {
assert.ifError(e);
}
});

it('should update status of all open pull requests for the repos and orgs that shared the same gist if user model has no requests stored', async function () {
Expand Down

0 comments on commit b710d77

Please sign in to comment.