Skip to content

Commit

Permalink
add test for RandomStorage for missing session state
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Dec 15, 2023
1 parent 717b147 commit 33b913a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/java/com/auth0/RandomStorageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public void shouldAcceptBothNullStates() {
assertThat(validState, is(true));
}

@Test
public void shouldFailIfSessionStateIsNullButCurrentStateNotNull() {
MockHttpServletRequest req = new MockHttpServletRequest();
boolean validState = RandomStorage.checkSessionState(req, "12345");
assertThat(validState, is(false));
}

@Test
public void shouldCheckAndRemoveInvalidState() {
MockHttpServletRequest req = new MockHttpServletRequest();
Expand Down

0 comments on commit 33b913a

Please sign in to comment.