mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -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
|
@ -41,26 +41,14 @@ void main() {
|
|||
test('throws when sha hex string is too short', () {
|
||||
expect(
|
||||
() => Oid.fromSHA(repo: repo, sha: 'sha'),
|
||||
throwsA(
|
||||
isA<ArgumentError>().having(
|
||||
(e) => e.toString(),
|
||||
'value',
|
||||
'Invalid argument: "sha is not a valid sha hex string"',
|
||||
),
|
||||
),
|
||||
throwsA(isA<ArgumentError>()),
|
||||
);
|
||||
});
|
||||
|
||||
test('throws when sha hex string is invalid', () {
|
||||
expect(
|
||||
() => Oid.fromSHA(repo: repo, sha: '0000000'),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"object not found - no match for id prefix (0000000)",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue