Fix false-passing test
Bug: Issue 8134 Change-Id: I639dfc4f1f149183a69a3caea5f4026d90f11751
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user