Skip to content

Commit

Permalink
format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza Taghizadeh committed Sep 11, 2024
1 parent 139a2ca commit cb70f89
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion lib/src/authentication/token_handler/jwt/jwt_signer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ class JwtSigner {
: {'_id': payload['_id']};
}
}

1 change: 0 additions & 1 deletion lib/src/authentication/token_handler/jwt/jwt_verifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ class JwtVerifier {
}
}
}

4 changes: 2 additions & 2 deletions lib/src/env_handler/parser/parser.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
abstract class Parser<T>{
abstract class Parser<T> {
T parse(String value);
}
}
1 change: 1 addition & 0 deletions test/src/authentication/authenticate_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:vania/src/exception/unauthenticated.dart';
import 'package:vania/vania.dart';

import 'authenticate_test.mocks.dart';

@GenerateMocks([AuthenticationManager, Request])
void main() {
group('Authenticate', () {
Expand Down
8 changes: 5 additions & 3 deletions test/src/authentication/authentication_manager_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:vania/vania.dart';

import 'authentication_manager_test.mocks.dart';


@GenerateMocks([TokenHandler, UserRepository, Config])
void main() {
group('AuthenticationManagerImpl', () {
Expand Down Expand Up @@ -42,7 +41,9 @@ void main() {
expect(result, false);
});

test('check method should return true when isCustomToken is false but user is exist', () async {
test(
'check method should return true when isCustomToken is false but user is exist',
() async {
when(mockTokenHandler.verify(any, any, any)).thenReturn({'id': '123'});
when(mockUserRepository.findUserByToken(any))
.thenAnswer((_) async => {'id': '123'});
Expand All @@ -57,7 +58,8 @@ void main() {
.thenAnswer((_) async => {'id': '123'});
when(mockConfig.get(any)).thenReturn({'provider': Model()});

final result = await authManager.check('validToken', isCustomToken: false, user: {'id': '123'});
final result = await authManager
.check('validToken', isCustomToken: false, user: {'id': '123'});
expect(result, true);
});

Expand Down
6 changes: 3 additions & 3 deletions test/src/env_handler/env_loader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:vania/src/env_handler/env_loader_impl.dart';

import 'env_loader_test.mocks.dart';



@GenerateMocks([File,])
@GenerateMocks([
File,
])
void main() {
group('EnvLoader', () {
test('should return empty map if .env file does not exist', () {
Expand Down

0 comments on commit cb70f89

Please sign in to comment.