1
+ /**
2
+ * The contents of this file are subject to the OpenMRS Public License
3
+ * Version 1.0 (the "License"); you may not use this file except in
4
+ * compliance with the License. You may obtain a copy of the License at
5
+ * http://license.openmrs.org
6
+ *
7
+ * Software distributed under the License is distributed on an "AS IS"
8
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9
+ * License for the specific language governing rights and limitations
10
+ * under the License.
11
+ *
12
+ * Copyright (C) OpenMRS, LLC. All Rights Reserved.
13
+ */
14
+ package org .openmrs .scheduler .web .controller ;
15
+
16
+ import static org .junit .Assert .assertNotNull ;
17
+
18
+ import javax .servlet .http .HttpServletRequest ;
19
+
20
+ import org .junit .Test ;
21
+ import org .openmrs .web .test .BaseWebContextSensitiveTest ;
22
+ import org .springframework .beans .factory .annotation .Autowired ;
23
+ import org .springframework .mock .web .MockHttpServletRequest ;
24
+ import org .springframework .mock .web .MockHttpServletResponse ;
25
+ import org .springframework .web .servlet .ModelAndView ;
26
+
27
+ public class SchedulerFormTest extends BaseWebContextSensitiveTest {
28
+
29
+ @ Autowired
30
+ private SchedulerFormController controller ;
31
+
32
+ /**
33
+ * See TRUNK-3970: Error when adding a task in version 1.9.3
34
+ * https://tickets.openmrs.org/browse/TRUNK-3970
35
+ */
36
+ @ Test
37
+ public void addANewTaskShouldNotError () throws Exception {
38
+ HttpServletRequest request = new MockHttpServletRequest ("GET" , "/openmrs/admin/scheduler/scheduler.form" );
39
+ ModelAndView mav = controller .handleRequest (request , new MockHttpServletResponse ());
40
+ assertNotNull (mav );
41
+ }
42
+ }
0 commit comments