Skip to content

Commit f0f6fad

Browse files
committed
Add Missing Fixture
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
1 parent 114b820 commit f0f6fad

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/test/java/io/securecodebox/persistence/defectdojo/service/UserProfileServiceTest.java

+17-1
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,20 @@ void search_withQueryParams() throws IOException, URISyntaxException {
7979
}
8080

8181
@Test
82-
@Disabled("TODO: Ad JSON fixture.")
8382
void get_byId() {
8483
final var response = """
8584
{
85+
"user": {
86+
"id": 42,
87+
"username": "alf",
88+
"first_name": "Gordon",
89+
"last_name": "Shumway",
90+
"email": "gordon.shumway@owasp.org",
91+
"last_login": "2022-11-01T16:20:19.373Z",
92+
"is_active": true,
93+
"is_superuser": true,
94+
"configuration_permissions": [0]
95+
}
8696
}
8797
""";
8898
stubFor(get(urlPathEqualTo("/api/v2/user_profile/42"))
@@ -91,6 +101,12 @@ void get_byId() {
91101
.withBody(response)
92102
));
93103
final var expected = UserProfile.builder()
104+
.user(User.builder()
105+
.id(42)
106+
.username("alf")
107+
.firstName("Gordon")
108+
.lastName("Shumway")
109+
.build())
94110
.build();
95111

96112
final var result = sut.get(42L);

0 commit comments

Comments
 (0)