feat(reference): add more bindings and API methods (#28)

This commit is contained in:
Aleksey Kulikov 2021-12-22 19:53:38 +03:00 committed by GitHub
parent fb4694cf06
commit ff2dd8b408
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 0 deletions

View file

@ -128,6 +128,19 @@ void main() {
ref.free();
});
test('duplicates existing reference', () {
expect(repo.references.length, 6);
final ref = repo.lookupReference('refs/heads/master');
final duplicate = ref.duplicate();
expect(repo.references.length, 6);
expect(duplicate, equals(ref));
duplicate.free();
ref.free();
});
group('create direct', () {
test('successfully creates with Oid as target', () {
final ref = repo.lookupReference('refs/heads/master');