discourse/test/javascripts/controllers/user-dropdown-test.js.es6

11 lines
426 B
Plaintext
Raw Normal View History

2014-07-31 06:56:01 +08:00
moduleFor("controller:user-dropdown");
2014-02-12 09:56:49 +08:00
test("showAdminLinks", function() {
const currentUser = Ember.Object.create({ staff: true });
const controller = this.subject({ currentUser });
2014-02-12 09:56:49 +08:00
equal(controller.get("showAdminLinks"), true, "is true when current user is a staff member");
currentUser.set("staff", false);
2014-02-12 09:56:49 +08:00
equal(controller.get("showAdminLinks"), false, "is false when current user is not a staff member");
});