{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/comments/49651734","id":49651734,"diff_hunk":"@@ -0,0 +1,68 @@\n+/**\n+ * This Source Code Form is subject to the terms of the Mozilla Public License,\n+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can\n+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under\n+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.\n+ *\n+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS\n+ * graphic logo is a trademark of OpenMRS Inc.\n+ */\n+package org.openmrs.web.controller;\n+\n+import org.openmrs.User;\n+import org.openmrs.test.BaseContextSensitiveTest;\n+import org.openmrs.web.test.BaseModuleWebContextSensitiveTest;\n+import org.openmrs.web.test.BaseWebContextSensitiveTest;\n+\n+import javax.servlet.http.HttpServletResponse;\n+\n+import org.apache.log4j.Level;\n+import org.apache.log4j.LogManager;\n+import org.apache.log4j.Logger;\n+import org.junit.After;\n+import org.junit.AfterClass;\n+import org.junit.Assert;\n+import org.junit.Before;\n+import org.junit.BeforeClass;\n+import org.junit.Test;\n+import org.springframework.mock.web.MockHttpServletRequest;\n+import org.springframework.mock.web.MockHttpServletResponse;\n+import org.springframework.web.servlet.ModelAndView;\n+\n+import java.net.BindException;\n+/**\n+ * Test the different aspects of\n+ * {@link org.openmrs.web.controller.ForgotPasswordFormController}\n+ */\n+public class ForgotPasswordFormControllerTest extends BaseModuleWebContextSensitiveTest {\n+\n+\tprivate static Level initialLogLevel;\n+\n+\tprivate static final String CLASS_TO_LOG = \"org.openmrs.api.db.hibernate.HibernateUserDAO\";\n+\n+\tprotected static final String TEST_DATA= \"org/openmrs/web/controller/include/ForgotPasswordFormControllerTest.xml\";\n+\n+\t/**\n+\t * Check to see if the admin's secret question comes back\n+\t *\n+\t * @throws Exception\n+\t */\n+\t@Test\n+\tpublic void shouldNotNotFailOnNotFoundUsernameTEST() throws Exception {\n+\t\tinitializeInMemoryDatabase();\n+\t\texecuteDataSet(TEST_DATA);\n+\t\tauthenticate();","path":"omod/src/test/java/org/openmrs/web/controller/ForgotPasswordFormControllerTest.java","position":54,"original_position":54,"commit_id":"4f9c44ce9b62ac92686ea229d13d9e96559fdd6c","original_commit_id":"4f9c44ce9b62ac92686ea229d13d9e96559fdd6c","user":{"login":"wluyima","id":1395907,"avatar_url":"https://avatars.githubusercontent.com/u/1395907?v=3","gravatar_id":"","url":"https://api.github.com/users/wluyima","html_url":"https://github.com/wluyima","followers_url":"https://api.github.com/users/wluyima/followers","following_url":"https://api.github.com/users/wluyima/following{/other_user}","gists_url":"https://api.github.com/users/wluyima/gists{/gist_id}","starred_url":"https://api.github.com/users/wluyima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wluyima/subscriptions","organizations_url":"https://api.github.com/users/wluyima/orgs","repos_url":"https://api.github.com/users/wluyima/repos","events_url":"https://api.github.com/users/wluyima/events{/privacy}","received_events_url":"https://api.github.com/users/wluyima/received_events","type":"User","site_admin":false},"body":"This too is already done by the super class","created_at":"2016-01-13T21:16:36Z","updated_at":"2016-01-13T21:16:36Z","html_url":"https://github.com/openmrs/openmrs-module-legacyui/pull/24#discussion_r49651734","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/comments/49651734"},"html":{"href":"https://github.com/openmrs/openmrs-module-legacyui/pull/24#discussion_r49651734"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24","id":55856554,"html_url":"https://github.com/openmrs/openmrs-module-legacyui/pull/24","diff_url":"https://github.com/openmrs/openmrs-module-legacyui/pull/24.diff","patch_url":"https://github.com/openmrs/openmrs-module-legacyui/pull/24.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/24","number":24,"state":"open","locked":false,"title":"LUI-45. Fixed code. Unable to write tests","user":{"login":"bholagabbar","id":11693595,"avatar_url":"https://avatars.githubusercontent.com/u/11693595?v=3","gravatar_id":"","url":"https://api.github.com/users/bholagabbar","html_url":"https://github.com/bholagabbar","followers_url":"https://api.github.com/users/bholagabbar/followers","following_url":"https://api.github.com/users/bholagabbar/following{/other_user}","gists_url":"https://api.github.com/users/bholagabbar/gists{/gist_id}","starred_url":"https://api.github.com/users/bholagabbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholagabbar/subscriptions","organizations_url":"https://api.github.com/users/bholagabbar/orgs","repos_url":"https://api.github.com/users/bholagabbar/repos","events_url":"https://api.github.com/users/bholagabbar/events{/privacy}","received_events_url":"https://api.github.com/users/bholagabbar/received_events","type":"User","site_admin":false},"body":"Pull request on the request of Wyclif Lumia.\r\n\r\nHave a look at the ForgotPasswordFormControllerTest.java file where I try and execute the tests. The test fails and the error is:\r\n\r\n<b>Failed tests: shouldNotNotFailOnNotFoundUsernameTEST(org.openmrs.web.controller.ForgotPasswordFormControllerTest): expected:<[check]> but was:<[What is your grandfather's home town?]</b>?\r\n\r\n\r\nThis means that the user is not being detected and a secret question is being randomly assigned. However, \"bruno\" is there in the test data. How do I overcome this?","created_at":"2016-01-13T05:39:05Z","updated_at":"2016-01-13T21:16:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4fadac1ab41baf387ec01f8579878cb65f59151","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/24/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/statuses/4f9c44ce9b62ac92686ea229d13d9e96559fdd6c","head":{"label":"bholagabbar:master","ref":"master","sha":"4f9c44ce9b62ac92686ea229d13d9e96559fdd6c","user":{"login":"bholagabbar","id":11693595,"avatar_url":"https://avatars.githubusercontent.com/u/11693595?v=3","gravatar_id":"","url":"https://api.github.com/users/bholagabbar","html_url":"https://github.com/bholagabbar","followers_url":"https://api.github.com/users/bholagabbar/followers","following_url":"https://api.github.com/users/bholagabbar/following{/other_user}","gists_url":"https://api.github.com/users/bholagabbar/gists{/gist_id}","starred_url":"https://api.github.com/users/bholagabbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholagabbar/subscriptions","organizations_url":"https://api.github.com/users/bholagabbar/orgs","repos_url":"https://api.github.com/users/bholagabbar/repos","events_url":"https://api.github.com/users/bholagabbar/events{/privacy}","received_events_url":"https://api.github.com/users/bholagabbar/received_events","type":"User","site_admin":false},"repo":{"id":48922960,"name":"openmrs-module-legacyui","full_name":"bholagabbar/openmrs-module-legacyui","owner":{"login":"bholagabbar","id":11693595,"avatar_url":"https://avatars.githubusercontent.com/u/11693595?v=3","gravatar_id":"","url":"https://api.github.com/users/bholagabbar","html_url":"https://github.com/bholagabbar","followers_url":"https://api.github.com/users/bholagabbar/followers","following_url":"https://api.github.com/users/bholagabbar/following{/other_user}","gists_url":"https://api.github.com/users/bholagabbar/gists{/gist_id}","starred_url":"https://api.github.com/users/bholagabbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholagabbar/subscriptions","organizations_url":"https://api.github.com/users/bholagabbar/orgs","repos_url":"https://api.github.com/users/bholagabbar/repos","events_url":"https://api.github.com/users/bholagabbar/events{/privacy}","received_events_url":"https://api.github.com/users/bholagabbar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bholagabbar/openmrs-module-legacyui","description":"The legacy user interface for OpenMRS 1.9 is chiefly comprised of administrative functions and the patient dashboard. Apparently, a new and more contemporary UI has been introduced via a UI framework and the legacy UI is kept around for administrative functions that are not yet implemented in the new UI. To retire the Legacy UI as planned, it is required to move the implementations and modules that still rely on it in order to maintain backwards compatibility. The main idea behind this project is to move legacy UI functions into an OpenMRS module that these implementations can install until they are able to migrate away from it, since most of the implementations of OpenMRS around the world are running OpenMRS 1.9.","fork":true,"url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui","forks_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/forks","keys_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/teams","hooks_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/hooks","issue_events_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/issues/events{/number}","events_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/events","assignees_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/assignees{/user}","branches_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/branches{/branch}","tags_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/tags","blobs_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/git/refs{/sha}","trees_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/statuses/{sha}","languages_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/languages","stargazers_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/stargazers","contributors_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/contributors","subscribers_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/subscribers","subscription_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/subscription","commits_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/commits{/sha}","git_commits_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/git/commits{/sha}","comments_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/comments{/number}","issue_comment_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/issues/comments{/number}","contents_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/contents/{+path}","compare_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/merges","archive_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/downloads","issues_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/issues{/number}","pulls_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/pulls{/number}","milestones_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/milestones{/number}","notifications_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/labels{/name}","releases_url":"https://api.github.com/repos/bholagabbar/openmrs-module-legacyui/releases{/id}","created_at":"2016-01-02T20:32:01Z","updated_at":"2016-01-13T05:32:35Z","pushed_at":"2016-01-13T05:37:05Z","git_url":"git://github.com/bholagabbar/openmrs-module-legacyui.git","ssh_url":"git@github.com:bholagabbar/openmrs-module-legacyui.git","clone_url":"https://github.com/bholagabbar/openmrs-module-legacyui.git","svn_url":"https://github.com/bholagabbar/openmrs-module-legacyui","homepage":"","size":1705,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmrs:master","ref":"master","sha":"e6335ac53604ea364b56cd9760e0bf138a4e405b","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":35045181,"name":"openmrs-module-legacyui","full_name":"openmrs/openmrs-module-legacyui","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-module-legacyui","description":"The legacy user interface for OpenMRS 1.9 is chiefly comprised of administrative functions and the patient dashboard. Apparently, a new and more contemporary UI has been introduced via a UI framework and the legacy UI is kept around for administrative functions that are not yet implemented in the new UI. To retire the Legacy UI as planned, it is required to move the implementations and modules that still rely on it in order to maintain backwards compatibility. The main idea behind this project is to move legacy UI functions into an OpenMRS module that these implementations can install until they are able to migrate away from it, since most of the implementations of OpenMRS around the world are running OpenMRS 1.9.","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui","forks_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/releases{/id}","created_at":"2015-05-04T16:12:32Z","updated_at":"2016-01-11T15:25:53Z","pushed_at":"2016-01-13T05:39:05Z","git_url":"git://github.com/openmrs/openmrs-module-legacyui.git","ssh_url":"git@github.com:openmrs/openmrs-module-legacyui.git","clone_url":"https://github.com/openmrs/openmrs-module-legacyui.git","svn_url":"https://github.com/openmrs/openmrs-module-legacyui","homepage":"","size":1733,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":2,"forks":20,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24"},"html":{"href":"https://github.com/openmrs/openmrs-module-legacyui/pull/24"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/24"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-module-legacyui/statuses/4f9c44ce9b62ac92686ea229d13d9e96559fdd6c"}}}}