mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 16:10:48 +08:00
FIX: Failing tests
This commit is contained in:
parent
3d0b310368
commit
f5ed0dc2e6
|
@ -61,11 +61,9 @@ const Discourse = Ember.Application.extend(FocusEvent, {
|
|||
$("title").text(title);
|
||||
}
|
||||
|
||||
var displayCount = this.displayCount;
|
||||
var dynamicFavicon = this.currentUser
|
||||
? !this.currentUser.get("dynamic_favicon")
|
||||
: false;
|
||||
if (displayCount > 0 && dynamicFavicon) {
|
||||
let displayCount = this.displayCount;
|
||||
let dynamicFavicon = this.currentUser && this.currentUser.dynamic_favicon;
|
||||
if (displayCount > 0 && !dynamicFavicon) {
|
||||
title = `(${displayCount}) ${title}`;
|
||||
}
|
||||
|
||||
|
|
|
@ -853,6 +853,11 @@ User.reopenClass(Singleton, {
|
|||
return null;
|
||||
},
|
||||
|
||||
resetCurrent(user) {
|
||||
this._super(user);
|
||||
Discourse.currentUser = user;
|
||||
},
|
||||
|
||||
checkUsername(username, email, for_user_id) {
|
||||
return ajax(userPath("check_username"), {
|
||||
data: { username, email, for_user_id }
|
||||
|
|
|
@ -124,7 +124,6 @@ QUnit.testStart(function(ctx) {
|
|||
Session.resetCurrent();
|
||||
User.resetCurrent();
|
||||
resetSite(Discourse.SiteSettings);
|
||||
Discourse.currentUser = User.current();
|
||||
|
||||
_DiscourseURL.redirectedTo = null;
|
||||
_DiscourseURL.redirectTo = function(url) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user