File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,23 @@ describe("Plugin GraphQL", () => {
5555 expect ( user . $isPersisted ) . toBeTruthy ( ) ;
5656 } ) ;
5757
58- test ( "is true for fetched records" , async ( ) => {
59- await Context . getInstance ( ) . loadSchema ( ) ;
60-
58+ test ( "is true for single fetched records" , async ( ) => {
6159 // @ts -ignore
6260 await User . fetch ( 1 ) ;
6361
64- const user : Data = User . find ( 1 ) ! as Data ;
62+ let user : Data = User . find ( 1 ) ! as Data ;
6563 expect ( user . $isPersisted ) . toBeTruthy ( ) ;
6664 } ) ;
65+
66+ test ( "is true for multiple fetched records" , async ( ) => {
67+ await User . fetch ( ) ;
68+ await Tariff . fetch ( ) ;
69+
70+ let user : Data = User . query ( ) . first ( ) ! as Data ;
71+ expect ( user . $isPersisted ) . toBeTruthy ( ) ;
72+
73+ let tariff : Data = Tariff . query ( ) . first ( ) ! as Data ;
74+ expect ( tariff . $isPersisted ) . toBeTruthy ( ) ;
75+ } ) ;
6776 } ) ;
6877} ) ;
You can’t perform that action at this time.
0 commit comments