From a28bc4641920f232e71a10c40e61609370fc0a8a Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Wed, 13 Apr 2022 13:54:49 +0300 Subject: [PATCH] test: fix failing tests --- test/libgit2_test.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/libgit2_test.dart b/test/libgit2_test.dart index fdc8bfe..744c280 100644 --- a/test/libgit2_test.dart +++ b/test/libgit2_test.dart @@ -15,14 +15,15 @@ void main() { ); }); - test('returns the owner validation setting for repository directories', () { - expect(Libgit2.ownerValidation, true); - }); + test( + 'sets and returns the owner validation setting for repository ' + 'directories', () { + final oldValue = Libgit2.ownerValidation; + Libgit2.ownerValidation = !oldValue; + expect(Libgit2.ownerValidation, equals(!oldValue)); - test('sets the owner validation setting for repository directories', () { - expect(Libgit2.ownerValidation, true); - Libgit2.ownerValidation = false; - expect(Libgit2.ownerValidation, false); + // Set it back + Libgit2.ownerValidation = oldValue; }); }); }