Renamed tests

This commit is contained in:
Philipp Czora
2018-08-08 15:14:39 +02:00
parent 499be7314e
commit 390ba29bee
7 changed files with 16 additions and 20 deletions

View File

@@ -21,9 +21,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
import static org.mockito.MockitoAnnotations.initMocks;
@SubjectAware(
@@ -72,7 +70,7 @@ public class ConfigResourceTest {
@Test
@SubjectAware(username = "writeOnly")
public void shouldGetConfigOnlyWhenAuthorized() throws URISyntaxException {
public void shouldNotGetConfigWhenNotAuthorized() throws URISyntaxException {
MockHttpRequest request = MockHttpRequest.get("/" + ConfigResource.CONFIG_PATH_V2);
MockHttpResponse response = new MockHttpResponse();
@@ -104,7 +102,7 @@ public class ConfigResourceTest {
@Test
@SubjectAware(username = "readOnly")
public void shouldUpdateConfigOnlyWhenAuthorized() throws URISyntaxException, IOException {
public void shouldNotUpdateConfigWhenNotAuthorized() throws URISyntaxException, IOException {
URL url = Resources.getResource("sonia/scm/api/v2/config-test-update.json");
byte[] configJson = Resources.toByteArray(url);
MockHttpRequest request = MockHttpRequest.put("/" + ConfigResource.CONFIG_PATH_V2)