File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,23 @@ describe("Plugin GraphQL", () => {
55
55
expect ( user . $isPersisted ) . toBeTruthy ( ) ;
56
56
} ) ;
57
57
58
- test ( "is true for fetched records" , async ( ) => {
59
- await Context . getInstance ( ) . loadSchema ( ) ;
60
-
58
+ test ( "is true for single fetched records" , async ( ) => {
61
59
// @ts -ignore
62
60
await User . fetch ( 1 ) ;
63
61
64
- const user : Data = User . find ( 1 ) ! as Data ;
62
+ let user : Data = User . find ( 1 ) ! as Data ;
65
63
expect ( user . $isPersisted ) . toBeTruthy ( ) ;
66
64
} ) ;
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
+ } ) ;
67
76
} ) ;
68
77
} ) ;
You can’t perform that action at this time.
0 commit comments