forked from eatvio/eatvio_app
fix: fixed analyzer and test
This commit is contained in:
@@ -200,13 +200,13 @@ void main() {
|
||||
.thenAnswer((_) async => chosenPlan);
|
||||
await cubit.getChosenPlan(id: 1);
|
||||
|
||||
when(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'mock'))
|
||||
when(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'alfa-bank'))
|
||||
.thenAnswer((_) async => paymentModel);
|
||||
|
||||
final result = await cubit.getPaymentLink();
|
||||
|
||||
expect(result, equals('https://payment.url'));
|
||||
verify(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'mock')).called(1);
|
||||
verify(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'alfa-bank')).called(1);
|
||||
});
|
||||
|
||||
test('getPaymentLink - возвращает null, если план не выбран', () async {
|
||||
@@ -254,7 +254,7 @@ void main() {
|
||||
.thenAnswer((_) async => chosenPlan);
|
||||
await cubit.getChosenPlan(id: 1);
|
||||
|
||||
when(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'mock'))
|
||||
when(mockChatRepository.getPaymentLink(id: 1, paymentProvider: 'alfa-bank'))
|
||||
.thenThrow(Exception('Ошибка'));
|
||||
|
||||
final result = await cubit.getPaymentLink();
|
||||
|
||||
Reference in New Issue
Block a user