mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-17 13:22:53 +01:00
test: fix stratum alternative error test (#608)
The test now checks for the expected id and reject-reason Co-authored-by: WantClue <86001033+WantClue@users.noreply.github.com>
This commit is contained in:
parent
1ea422f441
commit
b5d1e366c6
@ -174,10 +174,10 @@ TEST_CASE("Parse stratum result error", "[stratum]")
|
||||
TEST_CASE("Parse stratum result alternative error", "[stratum]")
|
||||
{
|
||||
StratumApiV1Message stratum_api_v1_message = {};
|
||||
const char *json_string = "{\"reject-reason\":\"Above target\",\"result\":false,\"error\":null,\"id\":8}";
|
||||
const char *json_string = "{\"reject-reason\":\"Above target 2\",\"result\":false,\"error\":null,\"id\":8}";
|
||||
STRATUM_V1_parse(&stratum_api_v1_message, json_string);
|
||||
TEST_ASSERT_EQUAL(1, stratum_api_v1_message.message_id);
|
||||
TEST_ASSERT_EQUAL(8, stratum_api_v1_message.message_id);
|
||||
TEST_ASSERT_EQUAL(STRATUM_RESULT, stratum_api_v1_message.method);
|
||||
TEST_ASSERT_FALSE(stratum_api_v1_message.response_success);
|
||||
TEST_ASSERT_EQUAL("Above target 2", stratum_api_v1_message.error_str);
|
||||
TEST_ASSERT_EQUAL_STRING("Above target 2", stratum_api_v1_message.error_str);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user