Commit 5337739c authored by Duvelis Carao's avatar Duvelis Carao
Browse files

Update error code response for integration testing

parent a3eb4651
Pipeline #10277 failed with stage
in 43 seconds
......@@ -47,15 +47,15 @@ public abstract class BaseTestTemplate extends TestBase {
}
@Test
public void should_return401_when_noAccessToken() throws Exception {
public void should_return403_when_noAccessToken() throws Exception {
ClientResponse response = descriptor.runOnCustomerTenant(getId(), testUtils.getNoAccessToken());
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
@Test
public void should_return401_when_accessingWithCredentialsWithoutPermission() throws Exception {
public void should_return403_when_accessingWithCredentialsWithoutPermission() throws Exception {
ClientResponse response = descriptor.run(getId(), testUtils.getNoAccessToken());
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
@Test
......@@ -90,8 +90,8 @@ public abstract class BaseTestTemplate extends TestBase {
}
@Test
public void should_return401_when_makingHttpRequestWithoutToken() throws Exception {
public void should_return403_when_makingHttpRequestWithoutToken() throws Exception {
ClientResponse response = descriptor.run(getId(), "");
assertEquals(error(response.getEntity(String.class)), 401, response.getStatus());
assertEquals(error(response.getEntity(String.class)), 403, response.getStatus());
}
}
Markdown is supported
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