@@ -108,7 +108,7 @@ describe('Auth', () => {
108108 const testUser = { 'foo' : 'bar' , 'biz' : 'baz' , 'user' : { '_id' : hexStr } } ;
109109 a . set ( testUser ) ;
110110 expect ( a . get ( ) ) . toEqual ( testUser ) ;
111- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
111+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
112112
113113 a . clear ( ) ;
114114 expect ( a . get ( ) ) . toBeNull ( ) ;
@@ -118,15 +118,15 @@ describe('Auth', () => {
118118 expect . assertions ( 1 ) ;
119119 const a = new Auth ( '/auth' ) ;
120120 return a . localAuth ( 'user' , 'password' , true ) . then ( ( ) => {
121- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
121+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
122122 } ) ;
123123 } ) ;
124124
125125 it ( 'should allow setting access tokens' , ( ) => {
126126 expect . assertions ( 3 ) ;
127127 const a = new Auth ( '/auth' ) ;
128128 return a . localAuth ( 'user' , 'password' , true ) . then ( ( ) => {
129- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
129+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
130130 expect ( a . get ( ) [ 'accessToken' ] ) . toBeUndefined ( ) ;
131131 a . setAccessToken ( 'foo' ) ;
132132 expect ( a . get ( ) [ 'accessToken' ] ) . toEqual ( 'foo' ) ;
@@ -138,7 +138,7 @@ describe('Auth', () => {
138138 let testClient = new BaasClient ( 'testapp' ) ;
139139 return testClient . authManager . localAuth ( 'user' , 'password' , true )
140140 . then ( ( ) => {
141- expect ( testClient . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
141+ expect ( testClient . authedId ( ) ) . toEqual ( hexStr ) ;
142142 expect ( testClient . authError ( ) ) . toBeFalsy ( ) ;
143143 expect ( testClient . auth ( ) ) . toEqual ( { user : { _id : hexStr } } ) ;
144144 } )
0 commit comments