tests: add authentication unit tests

This commit is contained in:
Udhay-Adithya
2025-07-07 02:03:47 +05:30
parent 32855fd2f9
commit 8d4eedc21b
9 changed files with 1658 additions and 58 deletions

View File

@@ -18,11 +18,11 @@ final historyMetaModel1 = HistoryMetaModel(
/// Basic History Request model 1
final historyRequestModel1 = HistoryRequestModel(
historyId: 'historyId1',
metaData: historyMetaModel1,
httpRequestModel: httpRequestModelGet4,
httpResponseModel: responseModel,
);
historyId: 'historyId1',
metaData: historyMetaModel1,
httpRequestModel: httpRequestModelGet4,
httpResponseModel: responseModel,
authModel: AuthModel(type: APIAuthType.none));
final historyMetaModel2 = HistoryMetaModel(
historyId: 'historyId2',
@@ -35,11 +35,11 @@ final historyMetaModel2 = HistoryMetaModel(
);
final historyRequestModel2 = HistoryRequestModel(
historyId: 'historyId2',
metaData: historyMetaModel2,
httpRequestModel: httpRequestModelPost10,
httpResponseModel: responseModel,
);
historyId: 'historyId2',
metaData: historyMetaModel2,
httpRequestModel: httpRequestModelPost10,
httpResponseModel: responseModel,
authModel: AuthModel(type: APIAuthType.none));
/// JSONs
final Map<String, dynamic> historyMetaModelJson1 = {
@@ -59,7 +59,15 @@ final Map<String, dynamic> historyRequestModelJson1 = {
"httpRequestModel": httpRequestModelGet4Json,
"httpResponseModel": responseModelJson,
'preRequestScript': null,
'postRequestScript': null
'postRequestScript': null,
'authModel': {
'type': 'none',
'apikey': null,
'bearer': null,
'basic': null,
'jwt': null,
'digest': null
}
};
final Map<String, dynamic> historyMetaModelJson2 = {