mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Renamed tests
This commit is contained in:
@@ -23,9 +23,7 @@ import javax.inject.Provider;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
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.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@@ -77,7 +75,7 @@ public class HgConfigAutoConfigurationResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "readOnly")
|
||||
public void shouldSetDefaultConfigAndInstallHgOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotSetDefaultConfigAndInstallHgWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
|
||||
|
||||
put(null);
|
||||
@@ -96,7 +94,7 @@ public class HgConfigAutoConfigurationResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "readOnly")
|
||||
public void shouldUpdateConfigAndInstallHgOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotUpdateConfigAndInstallHgWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
|
||||
|
||||
put("{\"disabled\":true}");
|
||||
|
||||
@@ -81,7 +81,7 @@ public class HgConfigInstallationsResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "writeOnly")
|
||||
public void shouldGetHgInstallationsOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotGetHgInstallationsWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
|
||||
|
||||
get("hg");
|
||||
@@ -103,7 +103,7 @@ public class HgConfigInstallationsResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "writeOnly")
|
||||
public void shouldGetPythonInstallationsOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotGetPythonInstallationsWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
|
||||
|
||||
get("python");
|
||||
|
||||
@@ -112,7 +112,7 @@ public class HgConfigPackageResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "writeOnly")
|
||||
public void shouldGetPackagesOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotGetPackagesWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
|
||||
|
||||
get();
|
||||
@@ -157,7 +157,7 @@ public class HgConfigPackageResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "readOnly")
|
||||
public void shouldInstallPackageOnlyWhenAuthorized() throws Exception {
|
||||
public void shouldNotInstallPackageWhenNotAuthorized() throws Exception {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
|
||||
|
||||
put("don-t-care");
|
||||
|
||||
@@ -121,7 +121,7 @@ public class HgConfigResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "writeOnly")
|
||||
public void shouldGetConfigOnlyWhenAuthorized() throws URISyntaxException {
|
||||
public void shouldNotGetConfigWhenNotAuthorized() throws URISyntaxException {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
|
||||
|
||||
get();
|
||||
@@ -136,7 +136,7 @@ public class HgConfigResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "readOnly")
|
||||
public void shouldUpdateConfigOnlyWhenAuthorized() throws URISyntaxException {
|
||||
public void shouldNotUpdateConfigWhenNotAuthorized() throws URISyntaxException {
|
||||
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
|
||||
|
||||
put();
|
||||
|
||||
Reference in New Issue
Block a user