You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, use the values provided in the json to create a StatusModel object, serialize it and compare it to the json provided in the description
Then, you will need to verify that the StatusService class can fetch data from the server and return a correct object. To do that, you will need to creat a new instance of dio with an adapter ( see https://github.com/vostpt/mobile-app/blob/develop/test/utils/dioadapter/parishes_endpoint_adapter.dart for how to do this) and then you will need to test:
-- Mock a 200 response with a valid json object, and you need to test it with an expected object (see the first test to get an idea how to do it)
-- Mock a 200 response with an invalid json and check that it throws an error
-- Mock a 400 response and check that it throws an error.
If you need any more instructions please do tell
I'll try to have an example for comparison as soon as possible.
Description
Unit tests for the endpoint
GET
{{base_url}}/occurrences/statuses
Pre-Requisites
Unit-Tests
The text was updated successfully, but these errors were encountered: