mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
feat(reference): add more bindings and API methods (#28)
This commit is contained in:
parent
fb4694cf06
commit
ff2dd8b408
3 changed files with 55 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue