Merge "Revert "Filter account entry suggestions"" into stable-2.15

This commit is contained in:
Paladox none
2018-05-08 19:16:22 +00:00
committed by Gerrit Code Review
2 changed files with 1 additions and 6 deletions

View File

@@ -119,9 +119,7 @@
},
_getReviewerSuggestions(input) {
if (!this.change || !this.change._number) { return Promise.resolve([]); }
input = `cansee:${this.change._number} ${input}`;
if (!this.change) { return Promise.resolve([]); }
const api = this.$.restAPI;
const xhr = this.allowAnyUser ?
api.getSuggestedAccounts(input) :

View File

@@ -79,7 +79,6 @@ limitations under the License.
element = fixture('basic');
element.change = {
_number: 42,
owner,
reviewers: {
CC: [existingReviewer1],
@@ -179,14 +178,12 @@ limitations under the License.
element._getReviewerSuggestions('').then(() => {
assert.isTrue(suggestReviewerStub.calledOnce);
assert.isTrue(suggestReviewerStub.calledWith(42, 'cansee:42 '));
assert.isFalse(suggestAccountStub.called);
element.allowAnyUser = true;
element._getReviewerSuggestions('').then(() => {
assert.isTrue(suggestReviewerStub.calledOnce);
assert.isTrue(suggestAccountStub.calledOnce);
assert.isTrue(suggestAccountStub.calledWith('cansee:42 '));
done();
});
});