diaspora/spec/javascripts/app/app_spec.js
2015-02-08 23:41:31 +01:00

14 lines
430 B
JavaScript

describe("app", function() {
describe("user", function() {
it("returns false if the current_user isn't set", function() {
app._user = undefined;
expect(app.user()).toEqual(false);
});
it("sets the user if given one and returns the current user", function() {
expect(app.user()).toBeFalsy();
app.user({name: "alice"});
expect(app.user().get("name")).toEqual("alice");
});
});
});