mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 12:45:51 +08:00
FIX: Broken qunit test
This commit is contained in:
parent
f773388105
commit
456a213904
@ -1,12 +1,16 @@
|
|||||||
|
var asianCategory = Discourse.Category.create({name: '确实是这样', id: 343434});
|
||||||
|
|
||||||
module("Discourse.NavItem", {
|
module("Discourse.NavItem", {
|
||||||
setup: function() {
|
setup: function() {
|
||||||
this.site = Discourse.Site.current();
|
Ember.run(function() {
|
||||||
this.asianCategory = Discourse.Category.create({name: '确实是这样', id: 343434});
|
Discourse.Site.currentProp('categories').addObject(asianCategory);
|
||||||
this.site.get('categories').addObject(this.asianCategory);
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
teardown: function() {
|
teardown: function() {
|
||||||
this.site.get('categories').removeObject(this.asianCategory);
|
Em.run(function() {
|
||||||
|
Discourse.Site.currentProp('categories').removeObject(asianCategory);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user