mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -42,7 +42,7 @@ TEST_F(RPCTransactionEntryHandlerTest, TxHashNotProvide)
|
||||
{
|
||||
runSpawn([this](auto yield) {
|
||||
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
|
||||
auto const output = handler.process(json::parse("{}"), Context{std::ref(yield)});
|
||||
auto const output = handler.process(json::parse("{}"), Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "fieldNotFoundTransaction");
|
||||
@@ -54,7 +54,7 @@ TEST_F(RPCTransactionEntryHandlerTest, TxHashWrongFormat)
|
||||
{
|
||||
runSpawn([this](auto yield) {
|
||||
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
|
||||
auto const output = handler.process(json::parse(R"({"tx_hash":"123"})"), Context{std::ref(yield)});
|
||||
auto const output = handler.process(json::parse(R"({"tx_hash":"123"})"), Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "invalidParams");
|
||||
@@ -79,7 +79,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NonExistLedgerViaLedgerHash)
|
||||
TXNID));
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
|
||||
auto const output = handler.process(input, Context{std::ref(yield)});
|
||||
auto const output = handler.process(input, Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
|
||||
@@ -104,7 +104,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NonExistLedgerViaLedgerIndex)
|
||||
TXNID));
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{TransactionEntryHandler{mockBackendPtr}};
|
||||
auto const output = handler.process(input, Context{std::ref(yield)});
|
||||
auto const output = handler.process(input, Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "lgrNotFound");
|
||||
@@ -129,7 +129,7 @@ TEST_F(RPCTransactionEntryHandlerTest, TXNotFound)
|
||||
"tx_hash": "{}"
|
||||
}})",
|
||||
TXNID));
|
||||
auto const output = handler.process(req, Context{std::ref(yield)});
|
||||
auto const output = handler.process(req, Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "transactionNotFound");
|
||||
@@ -162,7 +162,7 @@ TEST_F(RPCTransactionEntryHandlerTest, LedgerSeqNotMatch)
|
||||
"ledger_index": "30"
|
||||
}})",
|
||||
TXNID));
|
||||
auto const output = handler.process(req, Context{std::ref(yield)});
|
||||
auto const output = handler.process(req, Context{yield});
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = RPC::makeError(output.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "transactionNotFound");
|
||||
@@ -240,7 +240,7 @@ TEST_F(RPCTransactionEntryHandlerTest, NormalPath)
|
||||
}})",
|
||||
TXNID,
|
||||
tx.ledgerSequence));
|
||||
auto const output = handler.process(req, Context{std::ref(yield)});
|
||||
auto const output = handler.process(req, Context{yield});
|
||||
ASSERT_TRUE(output);
|
||||
EXPECT_EQ(json::parse(OUTPUT), *output);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user