Merge "Hook up topic removal to backend"

This commit is contained in:
Wyatt Allen 2016-12-05 18:19:55 +00:00 committed by Gerrit Code Review
commit e3f7c69059
2 changed files with 3 additions and 1 deletions

View File

@ -180,6 +180,7 @@
_handleTopicRemoved: function() {
this.set(['change', 'topic'], '');
this.$.restAPI.setChangeTopic(this.change.change_id, null);
},
});
})();

View File

@ -175,11 +175,12 @@ limitations under the License.
});
test('clicking x on topic chip removes topic', function() {
sandbox.stub(element, '_handleTopicChanged');
var topicStub = sandbox.stub(element.$.restAPI, 'setChangeTopic');
flushAsynchronousOperations();
var remove = element.$$('gr-linked-chip').$.remove;
MockInteractions.tap(remove);
assert.equal(element.change.topic, '');
assert.isTrue(topicStub.called);
});
});
});