fix: Change the field name from "close_time_iso" to "closed (#1531)

This commit is contained in:
cyan317
2024-07-10 13:47:02 +01:00
committed by GitHub
parent 5bcc11b347
commit 6e606cb7d8
2 changed files with 3 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ tag_invoke(boost::json::value_from_tag, boost::json::value& jv, LedgerIndexHandl
jv = boost::json::object{
{JS(ledger_index), output.ledgerIndex},
{JS(ledger_hash), output.ledgerHash},
{JS(close_time_iso), output.closeTimeIso},
{JS(closed), output.closeTimeIso},
{JS(validated), true},
};
}

View File

@@ -71,7 +71,7 @@ TEST_F(RPCLedgerIndexTest, NoDateGiven)
ASSERT_TRUE(output);
EXPECT_EQ(output.result->at("ledger_index").as_uint64(), RANGEMAX);
EXPECT_EQ(output.result->at("ledger_hash").as_string(), LEDGERHASH);
EXPECT_TRUE(output.result->as_object().contains("close_time_iso"));
EXPECT_TRUE(output.result->as_object().contains("closed"));
});
}
@@ -163,6 +163,6 @@ TEST_P(LedgerIndexTests, SearchFromLedgerRange)
ASSERT_TRUE(output);
EXPECT_EQ(output.result->at("ledger_index").as_uint64(), testBundle.expectedLedgerIndex);
EXPECT_EQ(output.result->at("ledger_hash").as_string(), LEDGERHASH);
EXPECT_EQ(output.result->at("close_time_iso").as_string(), testBundle.closeTimeIso);
EXPECT_EQ(output.result->at("closed").as_string(), testBundle.closeTimeIso);
});
}