diff --git a/extras/tests/JsonVariant/subscript.cpp b/extras/tests/JsonVariant/subscript.cpp index 9874819c..a03b2914 100644 --- a/extras/tests/JsonVariant/subscript.cpp +++ b/extras/tests/JsonVariant/subscript.cpp @@ -221,4 +221,12 @@ TEST_CASE("JsonVariantConst::operator[]") { REQUIRE(var.is() == false); REQUIRE(value == 0); } + + SECTION("get value from linked object") { + StaticJsonDocument<1024> doc1, doc2; + doc2["hello"] = "world"; + var.link(doc2); + + CHECK(cvar["hello"].as() == "world"); + } }