This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit bec24a5a authored by Eduard Frankford's avatar Eduard Frankford
Browse files

fixing tests

parent d63a2c94
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -189,7 +189,7 @@ public class InfoMailServiceIT {
MimeMessage message = messages.get(0);
assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail());
assertThat(message.getFrom()[0].toString()).isEqualTo(System.getenv("MAIL_FROM"));
assertThat(message.getFrom()[0].toString()).isEqualTo(jHipsterProperties.getMail().getFrom());
assertThat(message.getContent().toString()).isNotEmpty();
assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8");
}
......
......@@ -291,7 +291,7 @@ class UserResourceIT {
@Test
@Transactional
@WithMockUser(authorities = AuthoritiesConstants.USER, username = "johndoe")
@WithMockUser(authorities = AuthoritiesConstants.ADMIN, username = "johndoe")
void getUser() throws Exception {
// Initialize the database
userRepository.saveAndFlush(user);
......@@ -318,7 +318,7 @@ class UserResourceIT {
@Test
@Transactional
void getNonExistingUser() throws Exception {
restUserMockMvc.perform(get("/api/admin/users/unknown")).andExpect(status().isForbidden());
restUserMockMvc.perform(get("/api/admin/users/unknown")).andExpect(status().isNotFound());
}
@Test
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment