fix error reporting

This commit is contained in:
blagoev 2017-09-18 09:44:11 +03:00
parent ac6a39728a
commit 3ee26d5719
1 changed files with 3 additions and 3 deletions

View File

@ -55,13 +55,13 @@ function assertIsError(error, message) {
}
}
function assertIsAuthError(error, code, type) {
function assertIsAuthError(error, code, title) {
TestCase.assertInstanceOf(error, Realm.Sync.AuthError, 'The API should return an AuthError');
if (code) {
TestCase.assertEqual(error.code, code);
}
if (type) {
TestCase.assertEqual(error.type, type);
if (title) {
TestCase.assertEqual(error.title, title);
}
}