Fix false-passing test

Bug: Issue 8134
Change-Id: I639dfc4f1f149183a69a3caea5f4026d90f11751
This commit is contained in:
Viktar Donich
2018-02-14 10:49:55 -08:00
parent f6fd2307bd
commit b2c3605f43

View File

@@ -120,7 +120,7 @@ limitations under the License.
assert.isFalse(element._shouldHideActions({base: ['test']}, false));
});
test('plugin revision actions', () => {
test('plugin revision actions', done => {
sandbox.stub(element.$.restAPI, 'getChangeActionURL').returns(
Promise.resolve('the-url'));
element.revisionActions = {
@@ -131,10 +131,11 @@ limitations under the License.
assert.isTrue(element.$.restAPI.getChangeActionURL.calledWith(
element.changeNum, element.latestPatchNum, '/plugin~action'));
assert.equal(element.revisionActions['plugin~action'].__url, 'the-url');
done();
});
});
test('plugin change actions', () => {
test('plugin change actions', done => {
sandbox.stub(element.$.restAPI, 'getChangeActionURL').returns(
Promise.resolve('the-url'));
element.actions = {
@@ -144,7 +145,8 @@ limitations under the License.
flush(() => {
assert.isTrue(element.$.restAPI.getChangeActionURL.calledWith(
element.changeNum, null, '/plugin~action'));
assert.equal(element.revisionActions['plugin~action'].__url, 'the-url');
assert.equal(element.actions['plugin~action'].__url, 'the-url');
done();
});
});