aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-18 21:43:09 +0300
committerGravatar Vitaly Takmazov2018-02-18 21:43:09 +0300
commit1a27dc0aeea8ccf0bc1b0845b6465adfef2bc842 (patch)
treeb9c4b4f1d7032382cd44b96f84aad0509273ca8e /juick-server/src
parent1b1fe6fd0820a3671f37dc926248bc3e79d66140 (diff)
server: fix rss beans naming
Diffstat (limited to 'juick-server/src')
-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