forked from eatvio/eatvio_app
feat(dependencies): add rxdart package and improve string extension methods for better handling of empty strings and gender parsing
This commit is contained in:
32
test/features/settings/models/oauth_attach_request_test.dart
Normal file
32
test/features/settings/models/oauth_attach_request_test.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:eatvio_app/features/settings/models/oauth_attach_request.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
group('OAuthAttachRequest', () {
|
||||
test('создает OAuthAttachRequest с правильными значениями', () {
|
||||
const model = OAuthAttachRequest(
|
||||
provider: 'yandex',
|
||||
clientId: 'client-123',
|
||||
accessToken: 'access-token',
|
||||
refreshToken: 'refresh-token',
|
||||
);
|
||||
|
||||
expect(model.provider, 'yandex');
|
||||
expect(model.clientId, 'client-123');
|
||||
expect(model.accessToken, 'access-token');
|
||||
expect(model.refreshToken, 'refresh-token');
|
||||
});
|
||||
|
||||
test('создает OAuthAttachRequest без clientId', () {
|
||||
const model = OAuthAttachRequest(
|
||||
provider: 'yandex',
|
||||
clientId: null,
|
||||
accessToken: 'access-token',
|
||||
refreshToken: 'refresh-token',
|
||||
);
|
||||
|
||||
expect(model.clientId, isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user