This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing bug where expiration dates were improperly rendered in the CLI
- Loading branch information
1 parent
5d72366
commit 4a21270
Showing
2 changed files
with
28 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package keywhiz.cli; | ||
|
||
import keywhiz.api.ApiDate; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class PrintingTest { | ||
@Test | ||
public void apiDateToString() { | ||
String iso8601 = "2024-03-03T00:00:00Z"; | ||
ApiDate apiDate = ApiDate.parse(iso8601); | ||
assertEquals(iso8601, Printing.apiDateToString(apiDate)); | ||
} | ||
|
||
@Test | ||
public void epochSecondToString() { | ||
assertEquals("2024-03-03T00:00:00Z", Printing.epochSecondToString(1709424000L)); | ||
} | ||
} |