Skip to content

A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.

C++

test(redis): clear flat grid status on open

Tobi7d2ca2623ef1
diff --git a/macos/Tests/GridexTests/RedisDataGridLifecycleTests.swift b/macos/Tests/GridexTests/RedisDataGridLifecycleTests.swift
index c1ec025..909e492 100644
--- a/macos/Tests/GridexTests/RedisDataGridLifecycleTests.swift
+++ b/macos/Tests/GridexTests/RedisDataGridLifecycleTests.swift
@@ -22,6 +22,16 @@ final class RedisDataGridLifecycleTests: XCTestCase {
)
}
+ func test_openRedisFlatKeyListClearsStaleGlobalRowCountBeforeDisplay() {
+ let appState = AppState()
+ establishRedisContext(on: appState, databaseName: "db0")
+ appState.statusRowCount = 42
+
+ appState.openRedisFlatKeyList()
+
+ XCTAssertNil(appState.statusRowCount)
+ }
+
func test_redisContextMakesGridReadOnlyAndAllMutationEntryPointsNoOp() async {
let state = DataGridViewState()
state.bindRedisContext(redisContext(databaseName: "db0", revision: 1))