-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee92d21
commit 8593d22
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
extension/java-client-operate/src/main/java/io/camunda/operate/auth/TokenResponse.java
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
16 changes: 16 additions & 0 deletions
16
extension/java-client-operate/src/test/java/io/camunda/operate/auth/TokenResponseTest.java
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,16 @@ | ||
package io.camunda.operate.auth; | ||
|
||
import static org.assertj.core.api.Assertions.*; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import io.camunda.operate.auth.TokenResponseMapper.JacksonTokenResponseMapper; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TokenResponseTest { | ||
@Test | ||
void shouldIgnoreUnknownFields() { | ||
TokenResponseMapper tokenResponseMapper = new JacksonTokenResponseMapper(new ObjectMapper()); | ||
TokenResponse tokenResponse = tokenResponseMapper.readToken("{\"weird_field\":123}"); | ||
assertThat(tokenResponse).isNotNull(); | ||
} | ||
} |