diaspora/spec/javascripts/app/app_spec.js
Dennis Collinson b28508ecbc MS DC show last post and show page works unauthenticated
phasing out app.user() for app.currentUser
2012-02-24 19:09:00 -08:00

19 lines
568 B
JavaScript

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