mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
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:
parent
8791527ad9
commit
7f0cd86e72
35 changed files with 171 additions and 1331 deletions
|
@ -33,13 +33,7 @@ void main() {
|
|||
test('throws when trying to initialize and error occurs', () {
|
||||
expect(
|
||||
() => PackBuilder(Repository(nullptr)),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'repo'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -62,13 +56,7 @@ void main() {
|
|||
|
||||
expect(
|
||||
() => packbuilder.add(Oid(nullptr)),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'oid'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
|
||||
packbuilder.free();
|
||||
|
@ -89,13 +77,7 @@ void main() {
|
|||
|
||||
expect(
|
||||
() => packbuilder.addRecursively(Oid(nullptr)),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'id'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
|
||||
packbuilder.free();
|
||||
|
@ -160,13 +142,7 @@ void main() {
|
|||
|
||||
expect(
|
||||
() => packbuilder.write('invalid/path'),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
contains('failed to create temporary file'),
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
|
||||
packbuilder.free();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue