Skip to content

Commit 3f43fd6

Browse files
committedSep 11, 2013
Back porting to 1.9.x: Error when adding a task in version 1.9.3 -
TRUNK-3970
1 parent ee8e44d commit 3f43fd6

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed
 

‎web/src/test/java/org/openmrs/scheduler/web/controller/SchedulerFormControllerTest.java

-12
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,4 @@ public void onSubmit_shouldNotRescheduleATaskIfTheStartTimeHasPassed() throws Ex
186186
Assert.assertFalse(task.getStarted());
187187
}
188188
}
189-
190-
/**
191-
* See TRUNK-3970: Error when adding a task in version 1.9.3
192-
* https://tickets.openmrs.org/browse/TRUNK-3970
193-
*/
194-
@Ignore
195-
@Test
196-
public void addANewTaskShouldNotError() throws Exception {
197-
HttpServletRequest request = new MockHttpServletRequest("GET", "/openmrs/admin/scheduler/scheduler.form");
198-
ModelAndView mav = controller.handleRequest(request, new MockHttpServletResponse());
199-
assertNotNull(mav);
200-
}
201189
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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

Comments
 (0)
Please sign in to comment.