Merge pull request #1749 from velesin/has_current_user_test_improvement
adds small HasCurrentUser mixin test improvements
This commit is contained in:
commit
34cbea64d1
|
@ -1,14 +1,7 @@
|
|||
module("Discourse.HasCurrentUser", {
|
||||
setup: function() {
|
||||
sinon.stub(Discourse.User, "current");
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
Discourse.User.current.restore();
|
||||
}
|
||||
});
|
||||
module("Discourse.HasCurrentUser");
|
||||
|
||||
test("adds `currentUser` property to an object and ensures it is not cached", function() {
|
||||
sinon.stub(Discourse.User, "current");
|
||||
var testObj = Ember.Object.createWithMixins(Discourse.HasCurrentUser, {});
|
||||
|
||||
Discourse.User.current.returns("first user");
|
||||
|
|
Loading…
Reference in New Issue