forked from eatvio/eatvio_app
refactor: Corrected typo in MyRecipesCubit filename and updated related tests, widgets, services, and DI registrations.
This commit is contained in:
@@ -9,6 +9,10 @@ import 'package:mockito/mockito.dart';
|
||||
|
||||
import 'recipe_service_test.mocks.dart';
|
||||
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
|
||||
final mockHttpResponse = HttpResponse(null, Response(requestOptions: RequestOptions()));
|
||||
|
||||
@GenerateNiceMocks([MockSpec<CreateRecipeService>()])
|
||||
void main() {
|
||||
group('CreateRecipeService', () {
|
||||
@@ -77,7 +81,7 @@ void main() {
|
||||
final formData = FormData.fromMap({});
|
||||
|
||||
when(mockCreateRecipeService.publishRecipe(formData: formData))
|
||||
.thenAnswer((_) async => Future.value());
|
||||
.thenAnswer((_) async => Future.value(mockHttpResponse));
|
||||
|
||||
await mockCreateRecipeService.publishRecipe(formData: formData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user