Skip to content

Commit cc2ff39

Browse files
author
Hattinger04
committed
adding dependecy + fixing bug
1 parent fa4fb35 commit cc2ff39

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@
119119
<version>5.4.3</version>
120120
<scope>test</scope>
121121
</dependency>
122+
<dependency>
123+
<groupId>junit</groupId>
124+
<artifactId>junit</artifactId>
125+
<version>4.12</version>
126+
<scope>compile</scope>
127+
</dependency>
122128

123129
</dependencies>
124130

src/test/java/io/github/Hattinger04/UserControllerTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
@EnableJpaRepositories(basePackages = "io.github.Hattinger04.*")
4141
@AutoConfigureMockMvc
4242
@EnableAutoConfiguration
43-
4443
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = { UserController.class })
4544
class UserControllerTest {
4645

@@ -117,7 +116,7 @@ public void testCreateUser() throws Exception {
117116
@WithMockUser(authorities = "ADMIN")
118117
public void testUpdateUser() throws Exception {
119118
User user = new User();
120-
user.setId(3);
119+
user.setId(2);
121120
user.setUsername("new_user_updated");
122121
user.setPassword("new_password_updated");
123122

@@ -139,7 +138,7 @@ public void testUpdateUser() throws Exception {
139138
@WithMockUser(authorities = "ADMIN")
140139
public void testDeleteUserByID() throws Exception {
141140
User user = new User();
142-
user.setId(3);
141+
user.setId(2);
143142

144143
JsonNode node = objectMapper.valueToTree(user);
145144
ObjectNode objectNode = objectMapper.createObjectNode();

0 commit comments

Comments
 (0)