@@ -108,7 +108,7 @@ describe('Auth', () => {
108
108
const testUser = { 'foo' : 'bar' , 'biz' : 'baz' , 'user' : { '_id' : hexStr } } ;
109
109
a . set ( testUser ) ;
110
110
expect ( a . get ( ) ) . toEqual ( testUser ) ;
111
- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
111
+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
112
112
113
113
a . clear ( ) ;
114
114
expect ( a . get ( ) ) . toBeNull ( ) ;
@@ -118,15 +118,15 @@ describe('Auth', () => {
118
118
expect . assertions ( 1 ) ;
119
119
const a = new Auth ( '/auth' ) ;
120
120
return a . localAuth ( 'user' , 'password' , true ) . then ( ( ) => {
121
- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
121
+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
122
122
} ) ;
123
123
} ) ;
124
124
125
125
it ( 'should allow setting access tokens' , ( ) => {
126
126
expect . assertions ( 3 ) ;
127
127
const a = new Auth ( '/auth' ) ;
128
128
return a . localAuth ( 'user' , 'password' , true ) . then ( ( ) => {
129
- expect ( a . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
129
+ expect ( a . authedId ( ) ) . toEqual ( hexStr ) ;
130
130
expect ( a . get ( ) [ 'accessToken' ] ) . toBeUndefined ( ) ;
131
131
a . setAccessToken ( 'foo' ) ;
132
132
expect ( a . get ( ) [ 'accessToken' ] ) . toEqual ( 'foo' ) ;
@@ -138,7 +138,7 @@ describe('Auth', () => {
138
138
let testClient = new BaasClient ( 'testapp' ) ;
139
139
return testClient . authManager . localAuth ( 'user' , 'password' , true )
140
140
. then ( ( ) => {
141
- expect ( testClient . authedId ( ) ) . toEqual ( { '$oid' : hexStr } ) ;
141
+ expect ( testClient . authedId ( ) ) . toEqual ( hexStr ) ;
142
142
expect ( testClient . authError ( ) ) . toBeFalsy ( ) ;
143
143
expect ( testClient . auth ( ) ) . toEqual ( { user : { _id : hexStr } } ) ;
144
144
} )
0 commit comments