mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-28 01:20:32 +00:00
36 lines
767 B
C++
36 lines
767 B
C++
#include <test/jtx/Env.h>
|
|
#include <test/jtx/WSClient.h>
|
|
#include <test/jtx/amount.h>
|
|
|
|
#include <xrpl/beast/unit_test/suite.h>
|
|
#include <xrpl/json/json_value.h>
|
|
|
|
#include <chrono>
|
|
|
|
namespace xrpl::test {
|
|
|
|
class WSClient_test : public beast::unit_test::Suite
|
|
{
|
|
public:
|
|
void
|
|
run() override
|
|
{
|
|
using namespace jtx;
|
|
Env env(*this);
|
|
auto wsc = makeWSClient(env.app().config());
|
|
{
|
|
json::Value jv;
|
|
jv["streams"] = json::ValueType::Array;
|
|
jv["streams"].append("ledger");
|
|
}
|
|
env.fund(XRP(10000), "alice");
|
|
env.close();
|
|
auto jv = wsc->getMsg(std::chrono::seconds(1));
|
|
pass();
|
|
}
|
|
};
|
|
|
|
BEAST_DEFINE_TESTSUITE(WSClient, jtx, xrpl);
|
|
|
|
} // namespace xrpl::test
|