test: add more tests for throws and their messages

This commit is contained in:
Aleksey Kulikov 2021-10-19 17:16:39 +03:00
parent d6eae1e9ed
commit 127849519d
80 changed files with 2741 additions and 1501 deletions

View file

@ -82,6 +82,20 @@ void main() {
expect(credentials.toString(), contains('KeypairFromAgent{'));
});
test('sucessfully clones repository with provided username', () {
final callbacks = const Callbacks(credentials: Username('git'));
final repo = Repository.clone(
url: 'https://git@github.com/libgit2/TestGitRepository',
localPath: cloneDir.path,
callbacks: callbacks,
);
expect(repo.isEmpty, false);
repo.free();
});
test('sucessfully clones repository with provided keypair', () {
final keypair = const Keypair(
username: 'git',