 
   it "Authorizes properly for public rooms", (done) ->
     public_join_responses = [
-      [@anony, "session"], [@authenty, "success"], [@authory, "success"]
+      [@anony, "session"], [@sessiony, "success"],
+      [@authenty, "success"], [@authory, "success"]
     ]
     rooms = [ "dotstorm/#{@ds_public.id}", "firestarter/#{@fs_public.slug}",
               "resolve/#{@rs_public.id}",  "twinklepad/#{@tp_public.pad_id}"]

        # Build 3 users: anon, authenticated, and authorized.
        #
        (done) =>
          # anon
          @anony = common.build_sockjs_client(done)
        (done) =>
          # authenticated
          session = {cookie: { maxAge: 2000 }, session_id: "authenty"}
          @server.sockrooms.saveSession session, (err, ok) =>
            @authenty = common.build_sockjs_client =>
              @authenty.writeJSON {route: "identify", body: {session_id: "authenty"}}
              @authenty.onceJSON (data) ->
                expect(data).to.eql({route: "identify", body: {session_id: "authenty"}})
                done()
        (done) =>
          # authorized
          common.stubBrowserID(@browser, {email: "one@mockmyid.com"})
          session = {
            cookie: { maxAge: 2000 },


  it "Authorizes properly for private rooms", (done) ->
    private_join_responses = [
      [@anony, "session"], [@sessiony, "permission"],
      [@authenty, "permission"], [@authory, "success"]
    ]
    rooms = [ "dotstorm/#{@ds_private.id}", "firestarter/#{@fs_private.slug}",
              "resolve/#{@rs_private.id}",  "twinklepad/#{@tp_private.pad_id}"]
