Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content-packaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.meeds.content</groupId>
<artifactId>content</artifactId>
<version>7.2.x-SNAPSHOT</version>
<version>7.2.x-meeds-qaui-SNAPSHOT</version>
</parent>
<artifactId>content-packaging</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion content-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.meeds.content</groupId>
<artifactId>content</artifactId>
<version>7.2.x-SNAPSHOT</version>
<version>7.2.x-meeds-qaui-SNAPSHOT</version>
</parent>
<artifactId>content-service</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureWebMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.context.junit4.SpringRunner;

import org.exoplatform.commons.exception.ObjectNotFoundException;
Expand All @@ -49,16 +49,16 @@ public class ImageAttachmentPluginTest {

private static final String CMS_SETTING_NAME = "cmsSettingName";

@MockBean
@MockitoBean
private CMSService cmsService;

@MockBean
@MockitoBean
private IdentityManager identityManager;

@MockBean
@MockitoBean
private SpaceService spaceService;

@MockBean
@MockitoBean
private AttachmentService attachmentService;

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void shouldGetNewsWhenNewsExistsAndUserIsMemberOfTheSpace() throws Except
ResponseEntity response = newsRestController.getNewsById("1", null, null, false, null);

// Then
assertEquals(200, response.getStatusCodeValue());
assertTrue(response.getStatusCode().is2xxSuccessful());
News fetchedNews = (News) response.getBody();
assertNotNull(fetchedNews);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -69,7 +70,7 @@ public void shouldReturnOkWhenGetTargets() {
ResponseEntity response = newsTargetingRestController.getAllTargets();

// Then
assertEquals(HttpStatus.OK.value(), response.getStatusCodeValue());
assertTrue(response.getStatusCode().is2xxSuccessful());
}

@Test
Expand All @@ -82,15 +83,15 @@ public void shouldReturnOkWhenGetAllowedTargets() {
ResponseEntity response = newsTargetingRestController.getAllowedTargets();

// Then
assertEquals(org.springframework.http.HttpStatus.OK.value(), response.getStatusCodeValue());
assertTrue(response.getStatusCode().is2xxSuccessful());

when(newsTargetingRestController.getAllowedTargets()).thenThrow(RuntimeException.class);

// When
response = newsTargetingRestController.getAllowedTargets();

// Then
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR.value(), response.getStatusCodeValue());
assertTrue(response.getStatusCode().is5xxServerError());

}

Expand Down
2 changes: 1 addition & 1 deletion content-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>io.meeds.content</groupId>
<artifactId>content</artifactId>
<version>7.2.x-SNAPSHOT</version>
<version>7.2.x-meeds-qaui-SNAPSHOT</version>
</parent>
<artifactId>content-webapp</artifactId>
<packaging>war</packaging>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</parent>
<groupId>io.meeds.content</groupId>
<artifactId>content</artifactId>
<version>7.2.x-SNAPSHOT</version>
<version>7.2.x-meeds-qaui-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Meeds - Content Addon - Parent POM</name>
<description>Content</description>
Expand All @@ -38,9 +38,9 @@
</modules>

<properties>
<addon.meeds.notes.version>7.2.x-SNAPSHOT</addon.meeds.notes.version>
<addon.meeds.layout.version>7.2.x-SNAPSHOT</addon.meeds.layout.version>
<addon.meeds.mcp-server.version>7.2.x-SNAPSHOT</addon.meeds.mcp-server.version>
<addon.meeds.notes.version>7.2.x-meeds-qaui-SNAPSHOT</addon.meeds.notes.version>
<addon.meeds.layout.version>7.2.x-meeds-qaui-SNAPSHOT</addon.meeds.layout.version>
<addon.meeds.mcp-server.version>7.2.x-meeds-qaui-SNAPSHOT</addon.meeds.mcp-server.version>

<!-- Sonar properties -->
<sonar.organization>meeds-io</sonar.organization>
Expand Down
Loading