make tenants/ command return an array of objects, not just name
This commit is contained in:
parent
8c42806b9b
commit
7d535c00bc
@ -36,7 +36,9 @@ public class TenantsListCommand : OmsServerCommand
|
||||
IEnumerable<string> tenants = oms.GetTenants();
|
||||
foreach (string tenant in tenants)
|
||||
{
|
||||
ary.Add(JsonValue.Create(tenant));
|
||||
JsonObject ob = new JsonObject();
|
||||
ob.Add("name", JsonValue.Create(tenant));
|
||||
ary.Add(ob);
|
||||
}
|
||||
|
||||
if (e.Context.Request.PathParts.Length == 2)
|
||||
|
||||
@ -59,8 +59,8 @@ public class RemoteTests
|
||||
|
||||
JsonObject json = JsonNode.Parse(content) as JsonObject;
|
||||
Assert.That(json["result"].ToString(), Is.EqualTo("success"));
|
||||
Assert.That(json["tenants"].AsArray().Count, Is.EqualTo(1));
|
||||
Assert.That(json["tenants"].AsArray()[0].ToString(), Is.EqualTo("super"));
|
||||
// Assert.That(json["tenants"].AsArray().Count, Is.EqualTo(1));
|
||||
Assert.That(json["tenants"].AsArray()[0]["name"].ToString(), Is.EqualTo("super"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user