aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java4
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/RSSTests.java61
2 files changed, 5 insertions, 60 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
index ad417807..db9dab17 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
@@ -158,11 +158,11 @@ public class ApiAppConfiguration extends BaseWebConfiguration implements WebSock
return new BeanNameViewResolver();
}
@Bean
- AbstractRssFeedView messages() {
+ AbstractRssFeedView messagesView() {
return new MessagesView();
}
@Bean
- AbstractRssFeedView replies() {
+ AbstractRssFeedView repliesView() {
return new RepliesView();
}
@Override
diff --git a/juick-server/src/test/java/com/juick/server/tests/RSSTests.java b/juick-server/src/test/java/com/juick/server/tests/RSSTests.java
index a5e05a08..6a19123b 100644
--- a/juick-server/src/test/java/com/juick/server/tests/RSSTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/RSSTests.java
@@ -20,7 +20,9 @@ package com.juick.server.tests;
import com.juick.Message;
import com.juick.Tag;
import com.juick.User;
+import com.juick.configuration.RepositoryConfiguration;
import com.juick.server.configuration.ApiAppConfiguration;
+import com.juick.server.configuration.ApiSecurityConfig;
import com.juick.service.*;
import org.apache.commons.text.RandomStringGenerator;
import org.junit.Before;
@@ -52,66 +54,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* Created by vitalyster on 13.12.2016.
*/
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration
+@ContextConfiguration(classes = {ApiAppConfiguration.class, ApiSecurityConfig.class, RepositoryConfiguration.class})
@WebAppConfiguration
public class RSSTests {
- @Configuration
- @Import(value = {ApiAppConfiguration.class})
- static class Config {
- @Bean
- @Primary
- MessagesService messagesService() {
- return Mockito.mock(MessagesService.class);
- }
-
- @Bean
- @Primary
- UserService userService() {
- return Mockito.mock(UserService.class);
- }
-
- @Bean
- @Primary
- TagService tagService() {
- return Mockito.mock(TagService.class);
- }
- @Bean
- CrosspostService crosspostService() {
- return Mockito.mock(CrosspostService.class);
- }
- @Bean
- EmailService emailService() {
- return Mockito.mock(EmailService.class);
- }
- @Bean
- SubscriptionService subscriptionService() {
- return Mockito.mock(SubscriptionService.class);
- }
- @Bean
- MessengerService messengerService() {
- return Mockito.mock(MessengerService.class);
- }
- @Bean
- TelegramService telegramService() {
- return Mockito.mock(TelegramService.class);
- }
- @Bean
- PMQueriesService pmQueriesService() {
- return Mockito.mock(PMQueriesService.class);
- }
- @Bean
- ShowQueriesService showQueriesService() {
- return Mockito.mock(ShowQueriesService.class);
- }
- @Bean
- PrivacyQueriesService privacyQueriesService() {
- return Mockito.mock(PrivacyQueriesService.class);
- }
- @Bean
- PushQueriesService pushQueriesService() {
- return Mockito.mock(PushQueriesService.class);
- }
- }
private MockMvc mockMvc;
@Inject