File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -798,4 +798,31 @@ describe('SchemaController', () => {
798
798
} ) ;
799
799
done ( ) ;
800
800
} ) ;
801
+
802
+ it_exclude_dbs ( [ 'postgres' ] ) ( 'should not write _PushStaths to the schema on getOneSchema' , ( done ) => {
803
+ var schema ;
804
+ var config = new Config ( Parse . applicationId ) ;
805
+ var called ;
806
+ config . database . loadSchema ( ) . then ( ( aSchema ) => {
807
+ schema = aSchema ;
808
+ return schema . getOneSchema ( '_PushStatus' ) ;
809
+ } ) . catch ( err => {
810
+ called = true ;
811
+ return schema . getOneSchema ( '_PushStatus' , true ) ;
812
+ } ) . then ( ( res ) => {
813
+ expect ( called ) . toBe ( true ) ;
814
+ expect ( res ) . not . toBeUndefined ( ) ;
815
+ return config . database . adapter . _rawFind ( "_SCHEMA" )
816
+ } ) . then ( ( results ) => {
817
+ expect ( results . length ) . toBe ( 1 ) ;
818
+ results . forEach ( ( result ) => {
819
+ expect ( result . _id ) . not . toEqual ( '_PushStatus' ) ;
820
+ } ) ;
821
+ done ( ) ;
822
+ } ) . catch ( ( err ) => {
823
+ console . error ( err ) ;
824
+ fail ( err ) ;
825
+ done ( ) ;
826
+ } ) ;
827
+ } ) ;
801
828
} ) ;
You can’t perform that action at this time.
0 commit comments