{"action":"created","comment":{"url":"https://api.github.com/repos/yonadev/yona-server/pulls/comments/83363449","pull_request_review_id":4212634,"id":83363449,"diff_hunk":"@@ -27,5 +27,158 @@ class ActivityCategoriesTest extends Specification\n \t\tresponse.status == 200\n \t\tresponse.responseData._links.self.href == adminService.url + AdminService.ACTIVITY_CATEGORIES_PATH\n \t\tresponse.responseData._embedded.\"yona:activityCategories\".size() > 0\n+\t\tdef gamblingCategory = response.responseData._embedded.\"yona:activityCategories\".find\n+\t\t{\n+\t\t\tit._links.self.href ==~ /.*192d69f4-8d3e-499b-983c-36ca97340ba9.*/\n+\t\t}\n+\t\tgamblingCategory._links.self.href.startsWith(adminService.url)\n+\t\tgamblingCategory.localizableName[\"en-US\"] == \"Gambling\"\n+\t\tgamblingCategory.localizableName[\"nl-NL\"] == \"Gokken\"\n+\t\tgamblingCategory.mandatoryNoGo == true\n+\t\tgamblingCategory.smoothwallCategories as Set == [\"Gambling\", \"KS-Gokken\", \"lotto\"] as Set\n+\t\tgamblingCategory.applications as Set == [\"Lotto App\", \"Poker App\"] as Set\n+\t}\n+\n+\tdef 'Add programming activity category' ()\n+\t{\n+\t\tgiven:\n+\t\tdef englishName = \"Programming\"\n+\t\tString dutchName = \"Programmeren\"\n+\t\tboolean isNoGo = false\n+\t\tdef smoothwallCategories = [\"programming\", \"scripting\"] as Set\n+\t\tdef apps = [\"Eclipse\", \"Visual Studio\"] as Set\n+\t\tString programmingActivityCategoryJson = createActivityCategoryJson([\"nl-NL\": dutchName, \"en-US\" : englishName], isNoGo, smoothwallCategories, apps)\n+\t\twhen:\n+\t\tdef response = adminService.yonaServer.createResource(AdminService.ACTIVITY_CATEGORIES_PATH, programmingActivityCategoryJson)\n+\n+\t\tthen:\n+\t\tresponse.status == 200\n+\t\tresponse.responseData._links.self.href.startsWith(adminService.url)\n+\t\tresponse.responseData.localizableName[\"en-US\"] == englishName\n+\t\tresponse.responseData.localizableName[\"nl-NL\"] == dutchName\n+\t\tresponse.responseData.mandatoryNoGo == isNoGo\n+\t\tresponse.responseData.smoothwallCategories as Set == smoothwallCategories\n+\t\tresponse.responseData.applications as Set == apps\n+\n+\t\tdef getResponse = adminService.yonaServer.getResource(response.responseData._links.self.href)\n+\t\tgetResponse.status == 200\n+\t\tgetResponse.responseData._links.self.href.startsWith(adminService.url)\n+\t\tgetResponse.responseData.localizableName[\"en-US\"] == englishName\n+\t\tgetResponse.responseData.localizableName[\"nl-NL\"] == dutchName\n+\t\tgetResponse.responseData.mandatoryNoGo == isNoGo\n+\t\tgetResponse.responseData.smoothwallCategories as Set == smoothwallCategories\n+\t\tgetResponse.responseData.applications as Set == apps\n+\n+\t\tcleanup:\n+\t\tif (response.status == 200)\n+\t\t{\n+\t\t\tadminService.yonaServer.deleteResource(response.responseData._links.self.href)\n+\t\t}\n+\t}\n+\n+\tdef 'Update activity category' ()\n+\t{\n+\t\tgiven:\n+\t\tString programmingActivityCategoryJson = createActivityCategoryJson([\"nl-NL\": \"Programmeren\", \"en-US\" : \"Programming\"], false, [\"programming\", \"scripting\"], [\"Eclipse\", \"Visual Studio\"])\n+\t\tdef createResponse = adminService.yonaServer.createResource(AdminService.ACTIVITY_CATEGORIES_PATH, programmingActivityCategoryJson)\n+\t\tassert createResponse.status == 200\n+\t\tdef englishName = \"Chess\"\n+\t\tString dutchName = \"Schaken\"\n+\t\tboolean isNoGo = true\n+\t\tdef smoothwallCategories = [\"chess\"] as Set\n+\t\tdef apps = [\"Chess Free\", \"Analyze This\", \"Chess Opening Blunders\"] as Set\n+\t\tString chessActivityCategoryJson = createActivityCategoryJson([\"nl-NL\": dutchName, \"en-US\" : englishName], isNoGo, smoothwallCategories, apps)\n+\t\twhen:\n+\t\tdef response = adminService.yonaServer.updateResource(createResponse.responseData._links.self.href, chessActivityCategoryJson)\n+\n+\t\tthen:\n+\t\tresponse.status == 200\n+\t\tresponse.responseData._links.self.href == createResponse.responseData._links.self.href\n+\t\tresponse.responseData.localizableName[\"en-US\"] == englishName\n+\t\tresponse.responseData.localizableName[\"nl-NL\"] == dutchName\n+\t\tresponse.responseData.mandatoryNoGo == isNoGo\n+\t\tresponse.responseData.smoothwallCategories as Set == smoothwallCategories\n+\t\tresponse.responseData.applications as Set == apps\n+\n+\t\tdef getResponse = adminService.yonaServer.getResource(createResponse.responseData._links.self.href)\n+\t\tgetResponse.status == 200\n+\t\tgetResponse.responseData._links.self.href == createResponse.responseData._links.self.href\n+\t\tgetResponse.responseData.localizableName[\"en-US\"] == englishName\n+\t\tgetResponse.responseData.localizableName[\"nl-NL\"] == dutchName\n+\t\tgetResponse.responseData.mandatoryNoGo == isNoGo\n+\t\tgetResponse.responseData.smoothwallCategories as Set == smoothwallCategories\n+\t\tgetResponse.responseData.applications as Set == apps\n+\n+\t\tcleanup:\n+\t\tif (createResponse.status == 200)\n+\t\t{\n+\t\t\tadminService.yonaServer.deleteResource(createResponse.responseData._links.self.href)\n+\t\t}\n+\t}\n+\n+\tdef 'Delete programming activity category' ()\n+\t{\n+\t\tgiven:\n+\t\tString programmingActivityCategoryJson = createActivityCategoryJson([\"nl-NL\": \"Programmeren\", \"en-US\" : \"Programming\"], false, [\"programming\", \"scripting\"], [\"Eclipse\", \"Visual Studio\"])\n+\t\tdef createResponse = adminService.yonaServer.createResource(AdminService.ACTIVITY_CATEGORIES_PATH, programmingActivityCategoryJson)\n+\t\tassert createResponse.status == 200\n+\t\tdef numActivityCategories = adminService.getAllActivityCategories().responseData._embedded.\"yona:activityCategories\".size()\n+\t\twhen:\n+\t\tdef response = adminService.yonaServer.deleteResource(createResponse.responseData._links.self.href)\n+\n+\t\tthen:\n+\t\tresponse.status == 200\n+\t\tadminService.getAllActivityCategories().responseData._embedded.\"yona:activityCategories\".size() == numActivityCategories - 1\n+\t}\n+\n+\tdef 'Try add duplicate English name' ()\n+\t{\n+\t\tgiven:\n+\t\tString programmingActivityCategoryJson = createActivityCategoryJson([\"nl-NL\": \"Zomaar wat\", \"en-US\" : \"Gambling\"], false, [\"programming\", \"scripting\"], [\"Eclipse\", \"Visual Studio\"])\n+\t\twhen:\n+\t\tdef response = adminService.yonaServer.createResource(AdminService.ACTIVITY_CATEGORIES_PATH, programmingActivityCategoryJson)\n+\n+\t\tthen:\n+\t\tresponse.status == 400\n+\t\tresponse.responseData.code == \"error.activitycategory.duplicate.name\"\n+\t}\n+\n+\tdef 'Try update to duplicate Dutch name' ()","path":"adminservice/src/intTest/groovy/nu/yona/server/ActivityCategoriesTest.groovy","position":120,"original_position":120,"commit_id":"49517013ea5aba30ec0bbf6659182973e2900ba9","original_commit_id":"49517013ea5aba30ec0bbf6659182973e2900ba9","user":{"login":"aristotelos","id":2814758,"avatar_url":"https://avatars.githubusercontent.com/u/2814758?v=3","gravatar_id":"","url":"https://api.github.com/users/aristotelos","html_url":"https://github.com/aristotelos","followers_url":"https://api.github.com/users/aristotelos/followers","following_url":"https://api.github.com/users/aristotelos/following{/other_user}","gists_url":"https://api.github.com/users/aristotelos/gists{/gist_id}","starred_url":"https://api.github.com/users/aristotelos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristotelos/subscriptions","organizations_url":"https://api.github.com/users/aristotelos/orgs","repos_url":"https://api.github.com/users/aristotelos/repos","events_url":"https://api.github.com/users/aristotelos/events{/privacy}","received_events_url":"https://api.github.com/users/aristotelos/received_events","type":"User","site_admin":false},"body":"OK, I see now","created_at":"2016-10-14T06:18:29Z","updated_at":"2016-10-14T06:18:29Z","html_url":"https://github.com/yonadev/yona-server/pull/253#discussion_r83363449","pull_request_url":"https://api.github.com/repos/yonadev/yona-server/pulls/253","_links":{"self":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/comments/83363449"},"html":{"href":"https://github.com/yonadev/yona-server/pull/253#discussion_r83363449"},"pull_request":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/253"}}},"pull_request":{"url":"https://api.github.com/repos/yonadev/yona-server/pulls/253","id":88961614,"html_url":"https://github.com/yonadev/yona-server/pull/253","diff_url":"https://github.com/yonadev/yona-server/pull/253.diff","patch_url":"https://github.com/yonadev/yona-server/pull/253.patch","issue_url":"https://api.github.com/repos/yonadev/yona-server/issues/253","number":253,"state":"open","locked":false,"title":"YD-369 Enable activity category administration","user":{"login":"Bert-R","id":7149792,"avatar_url":"https://avatars.githubusercontent.com/u/7149792?v=3","gravatar_id":"","url":"https://api.github.com/users/Bert-R","html_url":"https://github.com/Bert-R","followers_url":"https://api.github.com/users/Bert-R/followers","following_url":"https://api.github.com/users/Bert-R/following{/other_user}","gists_url":"https://api.github.com/users/Bert-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Bert-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bert-R/subscriptions","organizations_url":"https://api.github.com/users/Bert-R/orgs","repos_url":"https://api.github.com/users/Bert-R/repos","events_url":"https://api.github.com/users/Bert-R/events{/privacy}","received_events_url":"https://api.github.com/users/Bert-R/received_events","type":"User","site_admin":false},"body":"The ActivityCategoryController in the admin service now supports add, update and delete of activity categories.","created_at":"2016-10-12T06:43:09Z","updated_at":"2016-10-14T06:18:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e47dabd4a76fb9bbeb833d5596d1465f37774a9b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yonadev/yona-server/pulls/253/commits","review_comments_url":"https://api.github.com/repos/yonadev/yona-server/pulls/253/comments","review_comment_url":"https://api.github.com/repos/yonadev/yona-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yonadev/yona-server/issues/253/comments","statuses_url":"https://api.github.com/repos/yonadev/yona-server/statuses/49517013ea5aba30ec0bbf6659182973e2900ba9","head":{"label":"yonadev:yd-369-enable-act-cat-administration","ref":"yd-369-enable-act-cat-administration","sha":"49517013ea5aba30ec0bbf6659182973e2900ba9","user":{"login":"yonadev","id":14901571,"avatar_url":"https://avatars.githubusercontent.com/u/14901571?v=3","gravatar_id":"","url":"https://api.github.com/users/yonadev","html_url":"https://github.com/yonadev","followers_url":"https://api.github.com/users/yonadev/followers","following_url":"https://api.github.com/users/yonadev/following{/other_user}","gists_url":"https://api.github.com/users/yonadev/gists{/gist_id}","starred_url":"https://api.github.com/users/yonadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonadev/subscriptions","organizations_url":"https://api.github.com/users/yonadev/orgs","repos_url":"https://api.github.com/users/yonadev/repos","events_url":"https://api.github.com/users/yonadev/events{/privacy}","received_events_url":"https://api.github.com/users/yonadev/received_events","type":"Organization","site_admin":false},"repo":{"id":43589108,"name":"yona-server","full_name":"yonadev/yona-server","owner":{"login":"yonadev","id":14901571,"avatar_url":"https://avatars.githubusercontent.com/u/14901571?v=3","gravatar_id":"","url":"https://api.github.com/users/yonadev","html_url":"https://github.com/yonadev","followers_url":"https://api.github.com/users/yonadev/followers","following_url":"https://api.github.com/users/yonadev/following{/other_user}","gists_url":"https://api.github.com/users/yonadev/gists{/gist_id}","starred_url":"https://api.github.com/users/yonadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonadev/subscriptions","organizations_url":"https://api.github.com/users/yonadev/orgs","repos_url":"https://api.github.com/users/yonadev/repos","events_url":"https://api.github.com/users/yonadev/events{/privacy}","received_events_url":"https://api.github.com/users/yonadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yonadev/yona-server","description":"Yona Server","fork":false,"url":"https://api.github.com/repos/yonadev/yona-server","forks_url":"https://api.github.com/repos/yonadev/yona-server/forks","keys_url":"https://api.github.com/repos/yonadev/yona-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yonadev/yona-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yonadev/yona-server/teams","hooks_url":"https://api.github.com/repos/yonadev/yona-server/hooks","issue_events_url":"https://api.github.com/repos/yonadev/yona-server/issues/events{/number}","events_url":"https://api.github.com/repos/yonadev/yona-server/events","assignees_url":"https://api.github.com/repos/yonadev/yona-server/assignees{/user}","branches_url":"https://api.github.com/repos/yonadev/yona-server/branches{/branch}","tags_url":"https://api.github.com/repos/yonadev/yona-server/tags","blobs_url":"https://api.github.com/repos/yonadev/yona-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yonadev/yona-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yonadev/yona-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/yonadev/yona-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yonadev/yona-server/statuses/{sha}","languages_url":"https://api.github.com/repos/yonadev/yona-server/languages","stargazers_url":"https://api.github.com/repos/yonadev/yona-server/stargazers","contributors_url":"https://api.github.com/repos/yonadev/yona-server/contributors","subscribers_url":"https://api.github.com/repos/yonadev/yona-server/subscribers","subscription_url":"https://api.github.com/repos/yonadev/yona-server/subscription","commits_url":"https://api.github.com/repos/yonadev/yona-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/yonadev/yona-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/yonadev/yona-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/yonadev/yona-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/yonadev/yona-server/contents/{+path}","compare_url":"https://api.github.com/repos/yonadev/yona-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yonadev/yona-server/merges","archive_url":"https://api.github.com/repos/yonadev/yona-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yonadev/yona-server/downloads","issues_url":"https://api.github.com/repos/yonadev/yona-server/issues{/number}","pulls_url":"https://api.github.com/repos/yonadev/yona-server/pulls{/number}","milestones_url":"https://api.github.com/repos/yonadev/yona-server/milestones{/number}","notifications_url":"https://api.github.com/repos/yonadev/yona-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yonadev/yona-server/labels{/name}","releases_url":"https://api.github.com/repos/yonadev/yona-server/releases{/id}","deployments_url":"https://api.github.com/repos/yonadev/yona-server/deployments","created_at":"2015-10-03T05:33:54Z","updated_at":"2016-10-13T19:33:45Z","pushed_at":"2016-10-13T19:45:39Z","git_url":"git://github.com/yonadev/yona-server.git","ssh_url":"git@github.com:yonadev/yona-server.git","clone_url":"https://github.com/yonadev/yona-server.git","svn_url":"https://github.com/yonadev/yona-server","homepage":null,"size":3084,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":3,"default_branch":"master"}},"base":{"label":"yonadev:master","ref":"master","sha":"11a424b406a92190490e2edee7a94dde4c456147","user":{"login":"yonadev","id":14901571,"avatar_url":"https://avatars.githubusercontent.com/u/14901571?v=3","gravatar_id":"","url":"https://api.github.com/users/yonadev","html_url":"https://github.com/yonadev","followers_url":"https://api.github.com/users/yonadev/followers","following_url":"https://api.github.com/users/yonadev/following{/other_user}","gists_url":"https://api.github.com/users/yonadev/gists{/gist_id}","starred_url":"https://api.github.com/users/yonadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonadev/subscriptions","organizations_url":"https://api.github.com/users/yonadev/orgs","repos_url":"https://api.github.com/users/yonadev/repos","events_url":"https://api.github.com/users/yonadev/events{/privacy}","received_events_url":"https://api.github.com/users/yonadev/received_events","type":"Organization","site_admin":false},"repo":{"id":43589108,"name":"yona-server","full_name":"yonadev/yona-server","owner":{"login":"yonadev","id":14901571,"avatar_url":"https://avatars.githubusercontent.com/u/14901571?v=3","gravatar_id":"","url":"https://api.github.com/users/yonadev","html_url":"https://github.com/yonadev","followers_url":"https://api.github.com/users/yonadev/followers","following_url":"https://api.github.com/users/yonadev/following{/other_user}","gists_url":"https://api.github.com/users/yonadev/gists{/gist_id}","starred_url":"https://api.github.com/users/yonadev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonadev/subscriptions","organizations_url":"https://api.github.com/users/yonadev/orgs","repos_url":"https://api.github.com/users/yonadev/repos","events_url":"https://api.github.com/users/yonadev/events{/privacy}","received_events_url":"https://api.github.com/users/yonadev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yonadev/yona-server","description":"Yona Server","fork":false,"url":"https://api.github.com/repos/yonadev/yona-server","forks_url":"https://api.github.com/repos/yonadev/yona-server/forks","keys_url":"https://api.github.com/repos/yonadev/yona-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yonadev/yona-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yonadev/yona-server/teams","hooks_url":"https://api.github.com/repos/yonadev/yona-server/hooks","issue_events_url":"https://api.github.com/repos/yonadev/yona-server/issues/events{/number}","events_url":"https://api.github.com/repos/yonadev/yona-server/events","assignees_url":"https://api.github.com/repos/yonadev/yona-server/assignees{/user}","branches_url":"https://api.github.com/repos/yonadev/yona-server/branches{/branch}","tags_url":"https://api.github.com/repos/yonadev/yona-server/tags","blobs_url":"https://api.github.com/repos/yonadev/yona-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yonadev/yona-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yonadev/yona-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/yonadev/yona-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yonadev/yona-server/statuses/{sha}","languages_url":"https://api.github.com/repos/yonadev/yona-server/languages","stargazers_url":"https://api.github.com/repos/yonadev/yona-server/stargazers","contributors_url":"https://api.github.com/repos/yonadev/yona-server/contributors","subscribers_url":"https://api.github.com/repos/yonadev/yona-server/subscribers","subscription_url":"https://api.github.com/repos/yonadev/yona-server/subscription","commits_url":"https://api.github.com/repos/yonadev/yona-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/yonadev/yona-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/yonadev/yona-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/yonadev/yona-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/yonadev/yona-server/contents/{+path}","compare_url":"https://api.github.com/repos/yonadev/yona-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yonadev/yona-server/merges","archive_url":"https://api.github.com/repos/yonadev/yona-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yonadev/yona-server/downloads","issues_url":"https://api.github.com/repos/yonadev/yona-server/issues{/number}","pulls_url":"https://api.github.com/repos/yonadev/yona-server/pulls{/number}","milestones_url":"https://api.github.com/repos/yonadev/yona-server/milestones{/number}","notifications_url":"https://api.github.com/repos/yonadev/yona-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yonadev/yona-server/labels{/name}","releases_url":"https://api.github.com/repos/yonadev/yona-server/releases{/id}","deployments_url":"https://api.github.com/repos/yonadev/yona-server/deployments","created_at":"2015-10-03T05:33:54Z","updated_at":"2016-10-13T19:33:45Z","pushed_at":"2016-10-13T19:45:39Z","git_url":"git://github.com/yonadev/yona-server.git","ssh_url":"git@github.com:yonadev/yona-server.git","clone_url":"https://github.com/yonadev/yona-server.git","svn_url":"https://github.com/yonadev/yona-server","homepage":null,"size":3084,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/253"},"html":{"href":"https://github.com/yonadev/yona-server/pull/253"},"issue":{"href":"https://api.github.com/repos/yonadev/yona-server/issues/253"},"comments":{"href":"https://api.github.com/repos/yonadev/yona-server/issues/253/comments"},"review_comments":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/253/comments"},"review_comment":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yonadev/yona-server/pulls/253/commits"},"statuses":{"href":"https://api.github.com/repos/yonadev/yona-server/statuses/49517013ea5aba30ec0bbf6659182973e2900ba9"}}}}
{"actor":{"display_login":"aristotelos"}}