Esempio n. 1
0
    it("should callback with the room if it exists", function(done) {
      findOneStub.yields(null, {});
      RoomManager.verifyRoom("foo", function(err, room) {
        should.not.exist(err);
        should.exist(room)

        done();
      });
    });
Esempio n. 2
0
    it("should callback with 'no-room' if the room doesn't exist", function(done) {
      findOneStub.yields(null, null);
      RoomManager.verifyRoom("foo", function(err, room) {
        err.should.eql("no-room");
        should.not.exist(room);

        done();
      });
    });