mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -552,7 +552,7 @@ TEST_P(LedgerEntryParameterTest, InvalidParams)
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{LedgerEntryHandler{mockBackendPtr}};
|
||||
auto const req = json::parse(testBundle.testJson);
|
||||
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());
|
||||
@@ -592,7 +592,7 @@ TEST_P(IndexTest, InvalidIndexUint256)
|
||||
"{}": "invalid"
|
||||
}})",
|
||||
index));
|
||||
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());
|
||||
@@ -611,7 +611,7 @@ TEST_P(IndexTest, InvalidIndexNotString)
|
||||
"{}": 123
|
||||
}})",
|
||||
index));
|
||||
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());
|
||||
@@ -642,7 +642,7 @@ TEST_F(RPCLedgerEntryTest, LedgerEntryNotFound)
|
||||
"account_root": "{}"
|
||||
}})",
|
||||
ACCOUNT));
|
||||
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(), "entryNotFound");
|
||||
@@ -917,7 +917,7 @@ TEST_P(RPCLedgerEntryNormalPathTest, NormalPath)
|
||||
runSpawn([&, this](auto yield) {
|
||||
auto const handler = AnyHandler{LedgerEntryHandler{mockBackendPtr}};
|
||||
auto const req = json::parse(testBundle.testJson);
|
||||
auto const output = handler.process(req, Context{std::ref(yield)});
|
||||
auto const output = handler.process(req, Context{yield});
|
||||
ASSERT_TRUE(output);
|
||||
EXPECT_EQ(output.value().at("ledger_hash").as_string(), LEDGERHASH);
|
||||
EXPECT_EQ(output.value().at("ledger_index").as_uint64(), RANGEMAX);
|
||||
@@ -972,7 +972,7 @@ TEST_F(RPCLedgerEntryTest, BinaryFalse)
|
||||
"payment_channel": "{}"
|
||||
}})",
|
||||
INDEX1));
|
||||
auto const output = handler.process(req, Context{std::ref(yield)});
|
||||
auto const output = handler.process(req, Context{yield});
|
||||
ASSERT_TRUE(output);
|
||||
EXPECT_EQ(*output, json::parse(OUT));
|
||||
});
|
||||
@@ -1001,7 +1001,7 @@ TEST_F(RPCLedgerEntryTest, UnexpectedLedgerType)
|
||||
"check": "{}"
|
||||
}})",
|
||||
INDEX1));
|
||||
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(), "unexpectedLedgerType");
|
||||
@@ -1026,7 +1026,7 @@ TEST_F(RPCLedgerEntryTest, LedgerNotExistViaIntSequence)
|
||||
}})",
|
||||
INDEX1,
|
||||
RANGEMAX));
|
||||
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(), "lgrNotFound");
|
||||
@@ -1052,7 +1052,7 @@ TEST_F(RPCLedgerEntryTest, LedgerNotExistViaStringSequence)
|
||||
}})",
|
||||
INDEX1,
|
||||
RANGEMAX));
|
||||
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(), "lgrNotFound");
|
||||
@@ -1078,7 +1078,7 @@ TEST_F(RPCLedgerEntryTest, LedgerNotExistViaHash)
|
||||
}})",
|
||||
INDEX1,
|
||||
LEDGERHASH));
|
||||
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(), "lgrNotFound");
|
||||
|
||||
Reference in New Issue
Block a user