test: fix windows tests

This commit is contained in:
Aleksey Kulikov 2021-10-28 12:03:06 +03:00
parent 0e329bd2b1
commit 13ddf0f061
11 changed files with 33 additions and 25 deletions

View file

@ -23,14 +23,14 @@ void main() {
test('successfully creates new bare repo at provided path', () {
repo = Repository.init(path: initDir.path, bare: true);
expect(repo.path, contains('${initDir.path}/'));
expect(repo.path, contains('/init_repo/'));
expect(repo.isBare, true);
});
test('successfully creates new standard repo at provided path', () {
repo = Repository.init(path: initDir.path);
expect(repo.path, contains('${initDir.path}/.git/'));
expect(repo.path, contains('/init_repo/.git/'));
expect(repo.isBare, false);
expect(repo.isEmpty, true);
});
@ -43,11 +43,11 @@ void main() {
flags: {GitRepositoryInit.mkdir, GitRepositoryInit.mkpath},
);
expect(repo.path, contains('${initDir.path}/.git/'));
expect(repo.path, contains('/init_repo/.git/'));
expect(repo.isBare, false);
expect(repo.isEmpty, true);
expect(
File('${initDir.path}/.git/description').readAsStringSync(),
File('${repo.workdir}.git/description').readAsStringSync(),
'test repo',
);
expect(repo.lookupRemote('origin').url, 'test.url');