mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Unit test for memo
This commit is contained in:
@@ -587,6 +587,20 @@ public:
|
||||
env(noop("alice"), memo("data1", "format1", "type1"), memo("data2", "format2", "type2"));
|
||||
}
|
||||
|
||||
void
|
||||
testMemoResult()
|
||||
{
|
||||
using namespace jtx;
|
||||
Env env(*this);
|
||||
JTx jt(noop("alice"));
|
||||
memo("data", "format", "type")(env, jt);
|
||||
|
||||
auto const& memo = jt.jv["Memos"][0u]["Memo"];
|
||||
BEAST_EXPECT(memo["MemoData"].asString() == strHex(std::string("data")));
|
||||
BEAST_EXPECT(memo["MemoFormat"].asString() == strHex(std::string("format")));
|
||||
BEAST_EXPECT(memo["MemoType"].asString() == strHex(std::string("type")));
|
||||
}
|
||||
|
||||
void
|
||||
testAdvance()
|
||||
{
|
||||
@@ -859,6 +873,7 @@ public:
|
||||
testJTxCopy();
|
||||
testJTxMove();
|
||||
testMemo();
|
||||
testMemoResult();
|
||||
testAdvance();
|
||||
testClose();
|
||||
testPath();
|
||||
|
||||
Reference in New Issue
Block a user