Skip to content

Commit

Permalink
fixing failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dante291 committed Nov 19, 2023
1 parent 7d2f39a commit 792e5ec
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions test/helpers/test_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,27 @@ GraphQLClient getAndRegisterGraphQLClient() {
// Either fill this with mock data or override this stub
// and return null

// when(
// service.query(
// QueryOptions(
// document: gql(queries.getPluginsList()),
// ),
// ),
// ).thenAnswer(
// (realInvocation) async {
// return QueryResult.internal(
// source: QueryResultSource.network,
// parserFn: (data) => {},
// data: {
// "getPlugins": [],
// },
// );
// },
// );
when(
service.query(
QueryOptions(
document: gql(queries.getPluginsList()),
),
),
).thenAnswer(
(realInvocation) async {
return Future.value(
QueryResult(
source: QueryResultSource.network,
data: {
"getPlugins": null,
},
options: QueryOptions(
document: gql(queries.getPluginsList()),
),
),
);
},
);

when(service.defaultPolicies).thenAnswer(
(realInvocation) => DefaultPolicies(),
Expand Down

0 comments on commit 792e5ec

Please sign in to comment.