Skip to content
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

Merged
merged 1 commit into from
Jun 28, 2017
Merged

RESTWS-660: SessionController to GET and POST locale information. #286

merged 1 commit into from
Jun 28, 2017

Conversation

mks-d
Copy link
Member

@mks-d mks-d commented Jun 26, 2017

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 46.113% when pulling 2fc8d4f on mekomsolutions:RESTWS-660 into 67deaa3 on openmrs:master.

@dkayiwa
Copy link
Member

dkayiwa commented Jun 27, 2017

The ticket status says you are still doing more work on this. 😊

@mks-d
Copy link
Member Author

mks-d commented Jun 27, 2017

Sorry... just transitioned it.

controller.post(new ObjectMapper().readValue(content, HashMap.class));
}

@Test(expected = RuntimeException.class)
Copy link
Member

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)
Copy link
Member

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());
Copy link
Member

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
@mks-d
Copy link
Member Author

mks-d commented Jun 28, 2017

@dkayiwa, I have made changes according to your recommendations.

@dkayiwa dkayiwa merged commit cb6450d into openmrs:master Jun 28, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 46.103% when pulling 878af48 on mekomsolutions:RESTWS-660 into 103b783 on openmrs:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants