Skip to content

Commit

Permalink
TRUNK-3949: Fixing build
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorytkowski committed Apr 2, 2013
1 parent 09948bb commit 7297fb3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Expand Up @@ -965,17 +965,17 @@ public void onSubmit_shouldRemoveAConceptMapFromAnExistingConcept() throws Excep

assertEquals(initialConceptMappingCount - 1, cs.getConcept(conceptId).getConceptMappings().size());
}

/**
* @see ConceptFormController#onSubmit(HttpServletRequest,HttpServletResponse,Object,BindException)
* @verifies not save changes if there are validation errors
*/
@Test
@NotTransactional
public void onSubmit_shouldNotSaveChangesIfThereAreValidationErrors() throws Exception {
Integer conceptId = 792;
MockHttpServletRequest request = new MockHttpServletRequest("POST", "/dictionary/concept.form");
* @see ConceptFormController#onSubmit(HttpServletRequest,HttpServletResponse,Object,BindException)
* @verifies not save changes if there are validation errors
*/
@Test
@NotTransactional
public void onSubmit_shouldNotSaveChangesIfThereAreValidationErrors() throws Exception {
Integer conceptId = 792;
MockHttpServletRequest request = new MockHttpServletRequest("POST", "/dictionary/concept.form");
request.setParameter("conceptId", conceptId.toString());
request.setParameter("namesByLocale[en].name", "should not change");
request.setParameter("preferredNamesByLocale[en]", "should not change");
Expand All @@ -987,5 +987,5 @@ public void onSubmit_shouldNotSaveChangesIfThereAreValidationErrors() throws Exc

Concept concept = conceptService.getConcept(conceptId);
assertThat(concept.getPreferredName(Locale.ENGLISH).getName(), is("STAVUDINE LAMIVUDINE AND NEVIRAPINE"));
}
}
}
Expand Up @@ -25,6 +25,7 @@
import org.openmrs.web.test.WebTestHelper.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.test.annotation.NotTransactional;

/**`
* Tests {@link RoleFormController}.
Expand All @@ -39,6 +40,7 @@ public UserService getUS() {
}

@Test
@NotTransactional
public void shouldUpdateRoleWithParent() throws Exception {
Role child = new Role("child", "child");
getUS().saveRole(child);
Expand All @@ -59,6 +61,8 @@ public void shouldUpdateRoleWithParent() throws Exception {
wth.handle(requestPOST);

Assert.assertEquals("updated child", getUS().getRole("child").getDescription());

deleteAllData();
}

}

0 comments on commit 7297fb3

Please sign in to comment.