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; }); }); }