@@ -145,7 +145,7 @@ query Post($id: ID!) {
145145}
146146 ` . trim ( ) + "\n" ) ;
147147
148- const post = store . getters [ 'entities/posts/ query' ] ( ) . withAll ( ) . where ( 'id' , 42 ) . first ( ) ;
148+ const post = Post . query ( ) . withAll ( ) . where ( 'id' , 42 ) . first ( ) ;
149149 expect ( post . title ) . toEqual ( 'Example Post 5' ) ;
150150 expect ( post . comments . length ) . toEqual ( 1 ) ;
151151 expect ( post . comments [ 0 ] . content ) . toEqual ( 'Works!' ) ;
@@ -375,7 +375,7 @@ mutation CreatePost($post: PostInput!) {
375375 } ;
376376
377377 const request = await sendWithMockFetch ( response , async ( ) => {
378- const user = store . getters [ 'entities/users/ find' ] ( 1 ) ;
378+ const user = User . find ( 1 ) ;
379379 user . name = 'Snoopy' ;
380380
381381 await store . dispatch ( 'entities/users/push' , { data : user } ) ;
@@ -427,7 +427,7 @@ mutation DeleteUser($id: ID!) {
427427
428428 describe ( 'custom mutation' , ( ) => {
429429 it ( 'sends the correct query to the API' , async ( ) => {
430- const post = store . getters [ 'entities/posts/ find' ] ( 1 ) ;
430+ const post = Post . find ( 1 ) ;
431431 const response = {
432432 data : {
433433 upvotePost : {
@@ -492,7 +492,7 @@ mutation UpvotePost($post: PostInput!, $captchaToken: String!) {
492492 let user = insertedData . users [ 0 ] ;
493493 expect ( user . $isPersisted ) . toBeFalsy ( ) ;
494494
495- user = store . getters [ 'entities/users/ find' ] ( user . id ) ;
495+ user = User . find ( user . id ) ;
496496 expect ( user . $isPersisted ) . toBeFalsy ( ) ;
497497 } ) ;
498498
@@ -556,7 +556,7 @@ mutation UpvotePost($post: PostInput!, $captchaToken: String!) {
556556 await store . dispatch ( 'entities/users/fetch' , { filter : { id : 1 } } ) ;
557557 } ) ;
558558
559- const user = store . getters [ 'entities/users/ find' ] ( 1 ) ;
559+ const user = User . find ( 1 ) ;
560560 expect ( user . $isPersisted ) . toBeTruthy ( ) ;
561561 } ) ;
562562 } ) ;
0 commit comments