From 22dee5afbee0c5301d39d055343928cbed864a29 Mon Sep 17 00:00:00 2001
From: Daniel Gerhardt <daniel.gerhardt@mni.thm.de>
Date: Sat, 9 Aug 2014 19:33:29 +0200
Subject: [PATCH] Fix testing configuration

---
 src/main/java/de/thm/arsnova/dao/CouchDBDao.java | 2 +-
 src/test/resources/test-config.xml               | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java
index 57857888f..8d66a403b 100644
--- a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java
+++ b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java
@@ -66,7 +66,7 @@ import de.thm.arsnova.exceptions.UnauthorizedException;
 import de.thm.arsnova.services.ISessionService;
 import de.thm.arsnova.services.IUserService;
 
-@Component
+@Component("databaseDao")
 public class CouchDBDao implements IDatabaseDao {
 	@Autowired
 	private IUserService userService;
diff --git a/src/test/resources/test-config.xml b/src/test/resources/test-config.xml
index 1b6ae97af..eb47eed87 100644
--- a/src/test/resources/test-config.xml
+++ b/src/test/resources/test-config.xml
@@ -5,6 +5,10 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
 
+	<bean id="servletContext" class="org.springframework.mock.web.MockServletContext">
+		<property name="contextPath" value="/" />
+	</bean>
+
 	<bean id="sessionService" class="de.thm.arsnova.services.SessionService">
 		<property name="databaseDao" ref="databaseDao" />
 	</bean>
-- 
GitLab