2014-07-30 18:56:01 -04:00
|
|
|
moduleFor("controller:site-map-category");
|
2013-11-27 15:58:36 -05:00
|
|
|
|
|
|
|
test("showBadges", function() {
|
2014-07-30 18:56:01 -04:00
|
|
|
sandbox.stub(Discourse.User, "current");
|
|
|
|
var controller = this.subject();
|
2013-11-27 15:58:36 -05:00
|
|
|
|
|
|
|
Discourse.User.current.returns(null);
|
|
|
|
ok(!controller.get("showBadges"), "returns false when no user is logged in");
|
|
|
|
|
|
|
|
Discourse.User.current.returns({});
|
|
|
|
ok(controller.get("showBadges"), "returns true when an user is logged in");
|
|
|
|
});
|