mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
test: fix odb test
This commit is contained in:
parent
586aa0c6aa
commit
1e8bbbee9b
1 changed files with 2 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
|
import 'dart:ffi';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:cli_util/cli_logging.dart';
|
|
||||||
import 'package:libgit2dart/libgit2dart.dart';
|
import 'package:libgit2dart/libgit2dart.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
@ -31,15 +31,7 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('throws when trying to get odb and error occurs', () {
|
test('throws when trying to get odb and error occurs', () {
|
||||||
final logger = Logger.standard();
|
expect(() => Repository((nullptr)).odb, throwsA(isA<LibGit2Error>()));
|
||||||
final objectsDir = Directory('${repo.workdir}.git/objects/');
|
|
||||||
logger.stdout(objectsDir.path);
|
|
||||||
objectsDir.deleteSync(recursive: true);
|
|
||||||
expect(objectsDir.existsSync(), false);
|
|
||||||
expect(
|
|
||||||
() => repo.odb,
|
|
||||||
throwsA(isA<LibGit2Error>()),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('successfully creates new odb with no backends', () {
|
test('successfully creates new odb with no backends', () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue