I'm expecting two instances to be equal.
I wrote the code below:
test('Should return a valid model when the user is fetched from the api',
() async {
final Map<String, dynamic> jsonMap =
json.decode(fixture('login_fixture.json'));
final result = LoginModel.fromJson(jsonMap);
expect(result, testingLoginModel);
});
It's failed with the following messages:
Expected: <Instance of 'LoginModel'>
Actual: <Instance of 'LoginModel'>
00:01 +0 -1: Some tests failed.
as we can see the expected result is equal the actual one "<Instance of 'LoginModel'>"
So why it is failing?