mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: improve coverage (#44)
This commit is contained in:
parent
bad5e20581
commit
7b57c41253
17 changed files with 171 additions and 40 deletions
|
@ -141,6 +141,17 @@ void main() {
|
|||
expect(newReflog.length, 3);
|
||||
});
|
||||
|
||||
test('throws when trying to write reflog to disk and error occurs', () {
|
||||
final ref = Reference.lookup(repo: repo, name: 'refs/heads/feature');
|
||||
final reflog = ref.log;
|
||||
Reference.delete(repo: repo, name: ref.name);
|
||||
|
||||
expect(() => reflog.write(), throwsA(isA<LibGit2Error>()));
|
||||
|
||||
reflog.free();
|
||||
ref.free();
|
||||
});
|
||||
|
||||
test('returns string representation of RefLogEntry object', () {
|
||||
expect(reflog[0].toString(), contains('RefLogEntry{'));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue