File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ describe('Parse User', () => {
49
49
Parse . initialize ( 'integration' , null , 'notsosecret' ) ;
50
50
Parse . CoreManager . set ( 'SERVER_URL' , 'http://localhost:1337/parse' ) ;
51
51
Parse . Storage . _clear ( ) ;
52
+ Parse . Object . registerSubclass ( '_User' , Parse . User ) ;
52
53
} ) ;
53
54
54
55
beforeEach ( ( done ) => {
@@ -632,6 +633,7 @@ describe('Parse User', () => {
632
633
633
634
it ( 'can get current with subclass' , async ( ) => {
634
635
Parse . User . enableUnsafeCurrentUser ( ) ;
636
+ Parse . Object . registerSubclass ( '_User' , CustomUser ) ;
635
637
636
638
const customUser = new CustomUser ( { foo : 'bar' } ) ;
637
639
customUser . setUsername ( 'username' ) ;
Original file line number Diff line number Diff line change @@ -871,7 +871,7 @@ const DefaultController = {
871
871
const json = user . toJSON ( ) ;
872
872
delete json . password ;
873
873
874
- json . className = user . constructor . name === ParseUser . name ? '_User' : user . constructor . name ;
874
+ json . className = '_User' ;
875
875
return Storage . setItemAsync (
876
876
path , JSON . stringify ( json )
877
877
) . then ( ( ) => {
You can’t perform that action at this time.
0 commit comments