This commit is contained in:
jackyq2015 2018-11-25 16:40:41 -05:00
parent 992a19f2dd
commit d9df1b63d9

View File

@ -119,10 +119,8 @@ public class DatabaseServiceTest extends DBExtensionTests{
public void testBuildLimitQuery() {
DatabaseService dbService = DatabaseService.get(testDbConfig.getDatabaseType());
String limitQuery = dbService.buildLimitQuery(100, 0, "SELECT * FROM " + testTable);
Assert.assertNotNull(limitQuery);
Assert.assertEquals(limitQuery, "SELECT * FROM " + testTable + " LIMIT " + 100 + " OFFSET " + 0 + ";");
Assert.assertEquals(limitQuery, "SELECT * FROM (SELECT * FROM " + testTable + ") data LIMIT " + 100 + " OFFSET " + 0 + ";");
}
@Test(groups = {"requiresMySQL"})