-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RESTWS-660: SessionController to GET and POST locale information. #286
Conversation
The ticket status says you are still doing more work on this. 😊 |
Sorry... just transitioned it. |
controller.post(new ObjectMapper().readValue(content, HashMap.class)); | ||
} | ||
|
||
@Test(expected = RuntimeException.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be APIException?
Assert.assertEquals(newLocale, Context.getLocale()); | ||
} | ||
|
||
@Test(expected = RuntimeException.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be APIException?
Locale newLocale = new Locale("sp"); | ||
String content = "{\"locale\":\"" + newLocale.toString() + "\"}"; | ||
controller.post(new ObjectMapper().readValue(content, HashMap.class)); | ||
Assert.assertEquals(newLocale, Context.getLocale()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add Assert.assertNotEquals(newLocale, Context.getLocale()) before posting?
modified: omod-1.8/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_8/SessionController1_8.java modified: omod-1.8/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_8/SessionController1_8Test.java
@dkayiwa, I have made changes according to your recommendations. |
No description provided.