From cfa89fa70dbecc12bc691f086bb8273509743f86 Mon Sep 17 00:00:00 2001 From: Moksh Mahajan Date: Wed, 8 Mar 2023 22:45:44 +0530 Subject: [PATCH] test(shorebird_code_push_api): add missing VersionStore test case (#46) --- .../test/src/version_store_test.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/shorebird_code_push_api/test/src/version_store_test.dart b/packages/shorebird_code_push_api/test/src/version_store_test.dart index aa6fda9f..e2ff346b 100644 --- a/packages/shorebird_code_push_api/test/src/version_store_test.dart +++ b/packages/shorebird_code_push_api/test/src/version_store_test.dart @@ -42,6 +42,20 @@ void main() { equals('0.0.2'), ); }); + + test('returns null when current version is the latest version', () { + final tempDir = Directory.systemTemp.createTempSync(); + final store = VersionStore(cachePath: tempDir.path) + ..addVersion('0.0.1', []) + ..addVersion('0.0.2', []); + expect( + store.latestVersionForClient( + 'empty-client-id', + currentVersion: '0.0.2', + ), + isNull, + ); + }); }); }); }