test: remove checks for messages of throws

Platform specific messages for throws is different, so checking that test
throws proper type should be enough
This commit is contained in:
Aleksey Kulikov 2021-10-27 16:44:04 +03:00
parent 8791527ad9
commit 7f0cd86e72
35 changed files with 171 additions and 1331 deletions

View file

@ -27,14 +27,7 @@ void main() {
test('throws when trying to create with empty name and email', () {
expect(
() => Signature.create(name: '', email: '', time: 0),
throwsA(
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to parse signature - Signature cannot have an empty name "
"or email",
),
),
throwsA(isA<LibGit2Error>()),
);
});
@ -43,14 +36,7 @@ void main() {
'default time', () {
expect(
() => Signature.create(name: '', email: ''),
throwsA(
isA<LibGit2Error>().having(
(e) => e.toString(),
'error',
"failed to parse signature - Signature cannot have an empty name "
"or email",
),
),
throwsA(isA<LibGit2Error>()),
);
});