Implement nextgen account_lines handler (#551)

Fixing #550
This commit is contained in:
Alex Kremer
2023-03-24 12:00:00 +00:00
committed by GitHub
parent 4180d81819
commit 8d5e28ef30
7 changed files with 1318 additions and 9 deletions

View File

@@ -383,7 +383,7 @@ TEST_F(RPCAccountHandlerTest, NonExistAccount)
// normal case when only provide account
TEST_F(RPCAccountHandlerTest, DefaultParameterTest)
{
constexpr static auto correntOutput = R"({
constexpr static auto correctOutput = R"({
"account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":30,
@@ -457,7 +457,7 @@ TEST_F(RPCAccountHandlerTest, DefaultParameterTest)
auto handler = AnyHandler{AccountChannelsHandler{this->mockBackendPtr}};
auto const output = handler.process(input, yield);
ASSERT_TRUE(output);
EXPECT_EQ(json::parse(correntOutput), *output);
EXPECT_EQ(json::parse(correctOutput), *output);
});
ctx.run();
}
@@ -640,7 +640,7 @@ TEST_F(RPCAccountHandlerTest, EmptyChannel)
// Return expiration cancel_offer source_tag destination_tag when available
TEST_F(RPCAccountHandlerTest, OptionalResponseField)
{
constexpr static auto correntOutput = R"({
constexpr static auto correctOutput = R"({
"account":"rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger_hash":"4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index":30,
@@ -725,7 +725,7 @@ TEST_F(RPCAccountHandlerTest, OptionalResponseField)
auto handler = AnyHandler{AccountChannelsHandler{this->mockBackendPtr}};
auto const output = handler.process(input, yield);
ASSERT_TRUE(output);
EXPECT_EQ(json::parse(correntOutput), *output);
EXPECT_EQ(json::parse(correctOutput), *output);
});
ctx.run();
}