Closed fimaljo closed 3 months ago
Hi there, are you adding the headers and/or body to the stub response of the MockClient?
when(() => httpClient.post(any(), headers: any(named: 'headers'), body: any(named: 'body'))).thenAnswer((_) async => response);
yes also i used mockito while using that this is the error MissingStubError: 'post' No stub was found which matches the arguments of this method call: post(https://feedback/create, {headers: null, body: null, encoding: null}) but there is no miss match
Hi @fimaljo 👋 Can you please provide a link to a minimal reproduction sample? Thanks!
Closing for now since this issue is quite old and there isn't a minimal reproduction sample. If this is still a problem please file a new issue with a link to a reproduction sample, thanks!
type 'Null' is not a subtype of type 'Future'
test\webservice\login\feedback_request_test.dart 14:7 MockClient.post
feedback_request_test.dart:14
package:choys/src/webservice/feedback/feedback_request.dart 24:35 FeedbackRequest.createFeedback
test\webservice\login\feedback_request_test.dart 81:51 main..