File tree 3 files changed +4
-4
lines changed
apollo-portal/src/test/java/com/ctrip/framework/apollo
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public class SkipAuthorizationConfiguration {
42
42
@ Bean
43
43
public ConsumerPermissionValidator consumerPermissionValidator () {
44
44
final ConsumerPermissionValidator mock = mock (ConsumerPermissionValidator .class );
45
- when (mock .hasCreateNamespacePermission (any (), any () )).thenReturn (true );
45
+ when (mock .hasCreateNamespacePermission (any ())).thenReturn (true );
46
46
return mock ;
47
47
}
48
48
@@ -61,7 +61,7 @@ public ConsumerAuthUtil consumerAuthUtil() {
61
61
}
62
62
63
63
@ Primary
64
- @ Bean ("permissionValidator " )
64
+ @ Bean ("userPermissionValidator " )
65
65
public UserPermissionValidator permissionValidator () {
66
66
final UserPermissionValidator mock = mock (UserPermissionValidator .class );
67
67
when (mock .isSuperAdmin ()).thenReturn (true );
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public class AppControllerTest {
107
107
@ Test
108
108
public void testFindAppsAuthorized () throws Exception {
109
109
final long consumerId = 123456 ;
110
- Mockito .when (this .consumerAuthUtil .retrieveConsumerId ( Mockito . any () )).thenReturn (consumerId );
110
+ Mockito .when (this .consumerAuthUtil .retrieveConsumerIdByCtx ( )).thenReturn (consumerId );
111
111
112
112
final List <ConsumerRole > consumerRoles = Arrays .asList (
113
113
generateConsumerRoleByRoleId (6 ),
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class NamespaceControllerTest extends AbstractControllerTest {
39
39
40
40
@ Test
41
41
public void shouldFailWhenAppNamespaceNameIsInvalid () {
42
- Assert .assertTrue (consumerPermissionValidator .hasCreateNamespacePermission (null , null ));
42
+ Assert .assertTrue (consumerPermissionValidator .hasCreateNamespacePermission (null ));
43
43
44
44
OpenAppNamespaceDTO dto = new OpenAppNamespaceDTO ();
45
45
dto .setAppId ("appId" );
You can’t perform that action at this time.
0 commit comments