test: add non-admin test for simulate (#1893)

This commit is contained in:
Peter Chen
2025-02-14 13:00:40 -05:00
committed by GitHub
parent 531e1dad6d
commit fcebd715ba

View File

@@ -105,7 +105,15 @@ generateTestValuesForParametersTest()
.called = 1, .called = 1,
.isAdmin = !isAdmin, .isAdmin = !isAdmin,
.expected = shouldForward}, .expected = shouldForward},
{.testName = "ShouldForwardReturnsTrueSimulate", {.testName = "ShouldForwardReturnsTrueIsNotAdminSimulate",
.apiVersion = 1u,
.method = "simulate",
.testJson = "{}",
.mockedIsClioOnly = !isClioOnly,
.called = 1,
.isAdmin = !isAdmin,
.expected = shouldForward},
{.testName = "ShouldForwardReturnsTrueIsAdminSimulate",
.apiVersion = 1u, .apiVersion = 1u,
.method = "simulate", .method = "simulate",
.testJson = "{}", .testJson = "{}",
@@ -113,7 +121,15 @@ generateTestValuesForParametersTest()
.called = 1, .called = 1,
.isAdmin = isAdmin, .isAdmin = isAdmin,
.expected = shouldForward}, .expected = shouldForward},
{.testName = "ShouldForwardReturnsTrueRipplePathFind", {.testName = "ShouldForwardReturnsTrueIsNotAdminRipplePathFind",
.apiVersion = 2u,
.method = "ripple_path_find",
.testJson = R"({"force_forward": true})",
.mockedIsClioOnly = !isClioOnly,
.called = 1,
.isAdmin = !isAdmin,
.expected = shouldForward},
{.testName = "ShouldForwardReturnsTrueIsAdminRipplePathFind",
.apiVersion = 2u, .apiVersion = 2u,
.method = "ripple_path_find", .method = "ripple_path_find",
.testJson = R"({"force_forward": true})", .testJson = R"({"force_forward": true})",