Corrected unit test in gerrit prompt().

The method was testing the init() method, not the prompt() method.
This corrects the test.

Change-Id: Id26e386aa3d6be0eb7d4778cf068679fec01426b
This commit is contained in:
Michael Krotscheck 2016-05-12 15:31:26 -07:00
parent 43b2171ce4
commit 36695dd8f8
No known key found for this signature in database
GPG Key ID: 20E618D878DE38AB
1 changed files with 5 additions and 3 deletions

View File

@ -98,11 +98,13 @@
});
describe('prompt()', function () {
it('should return a generator',
it('should return a promise that resolves with a generator',
function () {
var generator = mocks.buildGenerator();
var outputGenerator = gerrit.init(generator);
expect(outputGenerator).toEqual(generator);
var outputPromise = gerrit.prompt(generator);
outputPromise.then(function (outputGenerator) {
expect(outputGenerator).toEqual(generator);
});
});
it('should revert to config defaults if no answers provided',