mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
CE-1955 Update getValueAsInstant to handle a single-digit hour, by assuming a leading 0 on it.
This commit is contained in:
@ -251,6 +251,9 @@ class ValueUtilsTest extends BaseTest
|
||||
assertThrows(QValueException.class, () -> ValueUtils.getValueAsInstant("a,b"));
|
||||
assertThrows(QValueException.class, () -> ValueUtils.getValueAsInstant("1980/05/31"));
|
||||
assertThat(assertThrows(QValueException.class, () -> ValueUtils.getValueAsInstant(new Object())).getMessage()).contains("Unsupported class");
|
||||
|
||||
expected = Instant.parse("1980-05-31T01:30:00Z");
|
||||
assertEquals(expected, ValueUtils.getValueAsInstant("1980-05-31 1:30:00"));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user