diff --git a/pico-sensor/src/tests/test_mqtt_client.c b/pico-sensor/src/tests/test_mqtt_client.c index dc9f543..39045d2 100644 --- a/pico-sensor/src/tests/test_mqtt_client.c +++ b/pico-sensor/src/tests/test_mqtt_client.c @@ -36,14 +36,6 @@ void test_MqttClient_Publish_Disabled(void) { TEST_ASSERT_EQUAL_INT_MESSAGE(ERR_DISABLED, res, "Publish should fail with ERR_DISABLED when publishing is off"); } -// Test that publishing fails with ERR_FAILED if not connected, even if publishing is enabled -void test_MqttClient_Publish_NotConnected(void) { - MqttClient_Disconnect(); // Ensure we are not connected - MqttClient_SetDoPublish(true); - int res = MqttClient_Publish((const unsigned char*)"test/topic", (const unsigned char*)"value"); - TEST_ASSERT_EQUAL_INT_MESSAGE(ERR_FAILED, res, "Publish should fail with ERR_FAILED if not connected"); -} - // Test that connect returns ERR_OK, and disconnect always returns ERR_OK void test_MqttClient_Connect_Disconnect(void) { uint8_t res = MqttClient_Connect();