FIX: Use @username instead of user:username

This commit is contained in:
cpradio 2016-10-11 17:41:04 -04:00
parent 70f46d81a9
commit ca4130f30d
2 changed files with 3 additions and 3 deletions

View File

@ -99,9 +99,9 @@ export default Em.Component.extend({
const userFilter = this.get('searchedTerms.username'); const userFilter = this.get('searchedTerms.username');
if (userFilter && userFilter.length !== 0) if (userFilter && userFilter.length !== 0)
if (match.length !== 0) if (match.length !== 0)
searchTerm = searchTerm.replace(match, ` user:${userFilter}`); searchTerm = searchTerm.replace(match, ` @${userFilter}`);
else else
searchTerm += ` user:${userFilter}`; searchTerm += ` @${userFilter}`;
else if (match.length !== 0) else if (match.length !== 0)
searchTerm = searchTerm.replace(match, ''); searchTerm = searchTerm.replace(match, '');

View File

@ -105,7 +105,7 @@ test("update username through advanced search ui", assert => {
andThen(() => { andThen(() => {
assert.ok(exists('.search-options span:contains("admin")'), 'has "admin" pre-populated'); assert.ok(exists('.search-options span:contains("admin")'), 'has "admin" pre-populated');
assert.equal(find('.search input.full-page-search').val(), "none user:admin", 'has updated search term to "none user:admin"'); assert.equal(find('.search input.full-page-search').val(), "none @admin", 'has updated search term to "none user:admin"');
}); });
}); });
}); });