mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
More robust test (not based on exact number of tables)
This commit is contained in:
@ -68,7 +68,7 @@ class QJavalinImplementationTest extends QJavalinTestBase
|
|||||||
JSONObject jsonObject = JsonUtils.toJSONObject(response.getBody());
|
JSONObject jsonObject = JsonUtils.toJSONObject(response.getBody());
|
||||||
assertTrue(jsonObject.has("tables"));
|
assertTrue(jsonObject.has("tables"));
|
||||||
JSONObject tables = jsonObject.getJSONObject("tables");
|
JSONObject tables = jsonObject.getJSONObject("tables");
|
||||||
assertEquals(6, tables.length()); // person + 5 script tables
|
assertThat(tables.length()).isGreaterThan(1);
|
||||||
JSONObject personTable = tables.getJSONObject("person");
|
JSONObject personTable = tables.getJSONObject("person");
|
||||||
assertTrue(personTable.has("name"));
|
assertTrue(personTable.has("name"));
|
||||||
assertEquals("person", personTable.getString("name"));
|
assertEquals("person", personTable.getString("name"));
|
||||||
|
Reference in New Issue
Block a user