diff --git a/libs/BLEKit/tests/CoreGap_test.cpp b/libs/BLEKit/tests/CoreGap_test.cpp index bcd36ab0f2..42761f9514 100644 --- a/libs/BLEKit/tests/CoreGap_test.cpp +++ b/libs/BLEKit/tests/CoreGap_test.cpp @@ -209,3 +209,14 @@ TEST_F(CoreGapTest, isConnectedDefault) EXPECT_FALSE(is_connected); } + +TEST_F(CoreGapTest, isConnectedAfterConnection) +{ + auto dummy_on_connection_callback = std::function {}; + + coregap.onConnectionCallback(dummy_on_connection_callback); + + auto is_connected = coregap.isConnected(); + + EXPECT_TRUE(is_connected); +}