Skip to content

Commit

Permalink
- fix test bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackBear2003 committed Oct 19, 2023
1 parent add5f0d commit a154f53
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package com.ctrip.framework.apollo.audit.controller;

import com.ctrip.framework.apollo.audit.ApolloAuditProperties;
import com.ctrip.framework.apollo.audit.MockBeanFactory;
import com.ctrip.framework.apollo.audit.api.ApolloAuditLogApi;
import com.ctrip.framework.apollo.audit.dto.ApolloAuditLogDTO;
Expand Down Expand Up @@ -47,6 +48,8 @@ public class ApolloAuditControllerTest {
private MockMvc mockMvc;
@MockBean
private ApolloAuditLogApi api;
@MockBean
private ApolloAuditProperties properties;

@Test
public void testFindAllAuditLogs() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public ApolloAuditLogQueryApiPreAuthorizer apolloAuditLogQueryApiPreAuthorizer()
}

@Bean
public ApolloAuditController apolloAuditController(ApolloAuditLogApi api) {
public ApolloAuditController apolloAuditController(ApolloAuditLogApi api, ApolloAuditProperties apolloAuditProperties) {
return new ApolloAuditController(api, apolloAuditProperties);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ApolloAuditLogQueryApiPreAuthorizer apolloAuditLogQueryApiPreAuthorizer()
}

@Bean
public ApolloAuditController apolloAuditController(ApolloAuditLogApi api) {
public ApolloAuditController apolloAuditController(ApolloAuditLogApi api, ApolloAuditProperties apolloAuditProperties) {
return new ApolloAuditController(api, apolloAuditProperties);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ appService.service('AuditLogService', ['$resource', '$q', 'AppUtil', function ($
return {
is_enabled: function () {
var d = $q.defer();
audit_resource.is_enabled({}
, function (result) {
audit_resource.is_enabled({
}, function (result) {
d.resolve(result);
}, function (result) {
d.reject(result);
Expand Down

0 comments on commit a154f53

Please sign in to comment.