fix test
This commit is contained in:
@@ -49,7 +49,7 @@ void main() {
|
||||
.thenAnswer((_) async => http.Response(_customerJson, 200));
|
||||
|
||||
var dto = await controller.get(id: 4);
|
||||
expect(dto, isA<QuestionnaireCustomerListDto>());
|
||||
expect(dto, isA<QuestionnaireCustomerDto>());
|
||||
});
|
||||
|
||||
test('export a customer', () async {
|
||||
@@ -67,7 +67,7 @@ void main() {
|
||||
final client = MockClient();
|
||||
DiContainer.instance.put(HttpClientUtils, TestHttpCLientUtilsImpl(client));
|
||||
|
||||
when(client.get(Uri.parse('http://localhost:8080/api/questionnairecustomer/export/4?picture=1'), headers: {"Accept-Language": "en-US"}))
|
||||
when(client.get(Uri.parse('http://localhost:8080/api/questionnairecustomer/export/4?questionnaire=1'), headers: {"Accept-Language": "en-US"}))
|
||||
.thenAnswer((_) async => http.Response(_customerJson, 200));
|
||||
|
||||
var dto = await controller.export(customerId: 4, questionnaireId: 1);
|
||||
@@ -100,28 +100,24 @@ String _customerJson = '''{
|
||||
"id": 1,
|
||||
"name": "Müller Apotheke",
|
||||
"customerNumber": "1234",
|
||||
"pictures": [
|
||||
"city": "Hannover",
|
||||
"zip": "12345",
|
||||
"questionnaires": [
|
||||
{
|
||||
"id": 1,
|
||||
"comment": "good looking picture 1",
|
||||
"category": null,
|
||||
"pictureDate": 1729764570000,
|
||||
"evaluation": 1,
|
||||
"questionnaireDate": 1767262170000,
|
||||
"username": "verboomp",
|
||||
"imageUrl": "",
|
||||
"normalSizeUrl": "",
|
||||
"thumbnailSizeUrl": ""
|
||||
"evaluation": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"comment": "good looking picture 2",
|
||||
"category": null,
|
||||
"pictureDate": 1729764570000,
|
||||
"evaluation": 1,
|
||||
"questionnaireDate": 1767348570000,
|
||||
"username": "verboomp",
|
||||
"imageUrl": "",
|
||||
"normalSizeUrl": "",
|
||||
"thumbnailSizeUrl": ""
|
||||
"evaluation": 1
|
||||
}
|
||||
]
|
||||
}''';
|
||||
|
||||
Reference in New Issue
Block a user