Skip to content

Commit

Permalink
Small fix for name
Browse files Browse the repository at this point in the history
  • Loading branch information
szamfirov committed Mar 12, 2018
1 parent e8f953b commit 25887bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cd/go/authorization/okta/models/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class User {
private String username;

@Expose
@SerializedName("name")
@SerializedName("display_name")
private String displayName;

@Expose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void shouldAuthenticate() throws Exception {
" \"roles\": [],\n" +
" \"user\": {\n" +
" \"username\": \"[email protected]\",\n" +
" \"name\": \"Foo Bar\",\n" +
" \"display_name\": \"Foo Bar\",\n" +
" \"email\": \"[email protected]\"\n" +
" }\n" +
"}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class UserTest {
@Test
public void shouldSerializeToJSON() throws Exception {
final User user = new User("foo", "bar", "baz");
final String expectedJSON = "{\"username\":\"foo\",\"name\":\"bar\",\"email\":\"baz\"}";
final String expectedJSON = "{\"username\":\"foo\",\"display_name\":\"bar\",\"email\":\"baz\"}";

JSONAssert.assertEquals(expectedJSON, GSON.toJson(user), true);
}
Expand Down

0 comments on commit 25887bf

Please sign in to comment.