{"action":"created","comment":{"url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments/207098345","pull_request_review_id":142640641,"id":207098345,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzA5ODM0NQ==","diff_hunk":"@@ -0,0 +1,68 @@\n+<?php\n+\n+namespace Tests\\Browser\\Admin\\Categories;\n+\n+use Tests\\DuskTestCase;\n+use Laravel\\Dusk\\Browser;\n+use Illuminate\\Foundation\\Testing\\DatabaseMigrations;\n+use Tests\\Browser\\Admin\\AdminTestCase;\n+use Tests\\Browser\\Pages\\Admin\\Category\\UpdateCategory;\n+use Tests\\Browser\\Pages\\Admin\\Category\\ListCategories;\n+use Tests\\Browser\\Pages\\Admin\\Category\\UpdateChildCategory;\n+\n+class UpdateCategoryTest extends AdminTestCase\n+{\n+    /**\n+     * Override function setUp() for make user login\n+     *\n+     * @return void\n+     */\n+    public function setUp()\n+    {\n+        parent::setUp();\n+        factory('App\\Models\\Category')->create([\n+            'name' => 'Trà Sửa',\n+        ]);\n+        factory('App\\Models\\Category')->create([\n+            'name' => 'Trà Sửa Thái Xanh',\n+            'parent_id' => 1,\n+        ]);\n+        factory('App\\Models\\Category')->create([\n+            'name' => 'Cà Phê',\n+        ]);\n+    }\n+    \n+    /**\n+     * A Dusk test edit parent category success\n+     *\n+     * @return void\n+     */\n+    public function test_edit_parent_category_success()\n+    {\n+        $this->browse(function (Browser $browser) {\n+            $browser->loginAs($this->user)\n+                    ->visit(new UpdateCategory)\n+                    ->type('name', 'Trà Sửa Ngon')\n+                    ->press('Edit')\n+                    ->assertPathIs('/admin/categories')\n+                    ->assertSee(__('category.admin.message.edit'));\n+        });\n+    }\n+\n+    /**\n+     * A Dusk test edit parent category success\n+     *\n+     * @return void\n+     */\n+    public function test_edit_child_category_success()\n+    {\n+        $this->browse(function (Browser $browser) {\n+            $browser->loginAs($this->user)\n+                    ->visit(new UpdateChildCategory)\n+                    ->type('name', 'Trà Sửa Thái Đỏ')\n+                    ->press('Edit')\n+                    ->assertPathIs('/admin/categories/1/show-child')\n+                    ->assertSee(__('category.admin.message.edit'));","path":"tests/Browser/Admin/Categories/UpdateCategoryTest.php","position":65,"original_position":65,"commit_id":"12abc2ab1cb5402fc9861b599cdc5ea95f31e643","original_commit_id":"12abc2ab1cb5402fc9861b599cdc5ea95f31e643","user":{"login":"at-quangtran","id":15379864,"node_id":"MDQ6VXNlcjE1Mzc5ODY0","avatar_url":"https://avatars2.githubusercontent.com/u/15379864?v=4","gravatar_id":"","url":"https://api.github.com/users/at-quangtran","html_url":"https://github.com/at-quangtran","followers_url":"https://api.github.com/users/at-quangtran/followers","following_url":"https://api.github.com/users/at-quangtran/following{/other_user}","gists_url":"https://api.github.com/users/at-quangtran/gists{/gist_id}","starred_url":"https://api.github.com/users/at-quangtran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-quangtran/subscriptions","organizations_url":"https://api.github.com/users/at-quangtran/orgs","repos_url":"https://api.github.com/users/at-quangtran/repos","events_url":"https://api.github.com/users/at-quangtran/events{/privacy}","received_events_url":"https://api.github.com/users/at-quangtran/received_events","type":"User","site_admin":false},"body":"ko check db update giá trị đúng chưa hả?","created_at":"2018-08-02T04:25:14Z","updated_at":"2018-08-02T04:25:14Z","html_url":"https://github.com/AT-PHPIntership/foody/pull/13#discussion_r207098345","pull_request_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments/207098345"},"html":{"href":"https://github.com/AT-PHPIntership/foody/pull/13#discussion_r207098345"},"pull_request":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13","id":205604376,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjA0Mzc2","html_url":"https://github.com/AT-PHPIntership/foody/pull/13","diff_url":"https://github.com/AT-PHPIntership/foody/pull/13.diff","patch_url":"https://github.com/AT-PHPIntership/foody/pull/13.patch","issue_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/13","number":13,"state":"open","locked":false,"title":"Edit category","user":{"login":"at-vyle","id":40163579,"node_id":"MDQ6VXNlcjQwMTYzNTc5","avatar_url":"https://avatars2.githubusercontent.com/u/40163579?v=4","gravatar_id":"","url":"https://api.github.com/users/at-vyle","html_url":"https://github.com/at-vyle","followers_url":"https://api.github.com/users/at-vyle/followers","following_url":"https://api.github.com/users/at-vyle/following{/other_user}","gists_url":"https://api.github.com/users/at-vyle/gists{/gist_id}","starred_url":"https://api.github.com/users/at-vyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-vyle/subscriptions","organizations_url":"https://api.github.com/users/at-vyle/orgs","repos_url":"https://api.github.com/users/at-vyle/repos","events_url":"https://api.github.com/users/at-vyle/events{/privacy}","received_events_url":"https://api.github.com/users/at-vyle/received_events","type":"User","site_admin":false},"body":"## Description\r\n- Update category\r\n- Brower test\r\n## Reference Requirements\r\n\r\n\r\n## Reference Isuees\r\n\r\n## Migrations\r\nNO\r\n\r\n## Impacted Areas in Application\r\nList general components of the application that this PR will affect:\r\n\r\n-\r\n\r\n## SQL query and `explain`\r\nList of all queries and attach the result of each explaining query (in text, screenshot...)\r\n\r\n- Refer to [Using Explain with MySQL](https://viblo.asia/p/su-dung-explain-de-toi-uu-cau-lenh-mysql-BYjv44gmvxpV)\r\n","created_at":"2018-08-02T02:48:33Z","updated_at":"2018-08-02T04:25:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abf16c485605489eb95d4b7dd6da8bf9cabf56e6","assignee":{"login":"at-hienpham","id":40163625,"node_id":"MDQ6VXNlcjQwMTYzNjI1","avatar_url":"https://avatars1.githubusercontent.com/u/40163625?v=4","gravatar_id":"","url":"https://api.github.com/users/at-hienpham","html_url":"https://github.com/at-hienpham","followers_url":"https://api.github.com/users/at-hienpham/followers","following_url":"https://api.github.com/users/at-hienpham/following{/other_user}","gists_url":"https://api.github.com/users/at-hienpham/gists{/gist_id}","starred_url":"https://api.github.com/users/at-hienpham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-hienpham/subscriptions","organizations_url":"https://api.github.com/users/at-hienpham/orgs","repos_url":"https://api.github.com/users/at-hienpham/repos","events_url":"https://api.github.com/users/at-hienpham/events{/privacy}","received_events_url":"https://api.github.com/users/at-hienpham/received_events","type":"User","site_admin":false},"assignees":[{"login":"at-hienpham","id":40163625,"node_id":"MDQ6VXNlcjQwMTYzNjI1","avatar_url":"https://avatars1.githubusercontent.com/u/40163625?v=4","gravatar_id":"","url":"https://api.github.com/users/at-hienpham","html_url":"https://github.com/at-hienpham","followers_url":"https://api.github.com/users/at-hienpham/followers","following_url":"https://api.github.com/users/at-hienpham/following{/other_user}","gists_url":"https://api.github.com/users/at-hienpham/gists{/gist_id}","starred_url":"https://api.github.com/users/at-hienpham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-hienpham/subscriptions","organizations_url":"https://api.github.com/users/at-hienpham/orgs","repos_url":"https://api.github.com/users/at-hienpham/repos","events_url":"https://api.github.com/users/at-hienpham/events{/privacy}","received_events_url":"https://api.github.com/users/at-hienpham/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":999649370,"node_id":"MDU6TGFiZWw5OTk2NDkzNzA=","url":"https://api.github.com/repos/AT-PHPIntership/foody/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13/commits","review_comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13/comments","review_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/13/comments","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/12abc2ab1cb5402fc9861b599cdc5ea95f31e643","head":{"label":"AT-PHPIntership:edit-category","ref":"edit-category","sha":"12abc2ab1cb5402fc9861b599cdc5ea95f31e643","user":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":141513371,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTMzNzE=","name":"foody","full_name":"AT-PHPIntership/foody","owner":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/foody","description":"Foody","fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/foody","forks_url":"https://api.github.com/repos/AT-PHPIntership/foody/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/foody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/foody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/foody/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/foody/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/foody/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/foody/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/foody/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/foody/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/foody/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/foody/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/foody/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/foody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/foody/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/foody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/foody/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/foody/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/foody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/foody/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/foody/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/foody/deployments","created_at":"2018-07-19T02:19:45Z","updated_at":"2018-08-02T03:26:43Z","pushed_at":"2018-08-02T04:22:04Z","git_url":"git://github.com/AT-PHPIntership/foody.git","ssh_url":"git@github.com:AT-PHPIntership/foody.git","clone_url":"https://github.com/AT-PHPIntership/foody.git","svn_url":"https://github.com/AT-PHPIntership/foody","homepage":null,"size":744,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"AT-PHPIntership:master","ref":"master","sha":"58d40f126d69cb1f08e5ac8d9ec938323614805a","user":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":141513371,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MTMzNzE=","name":"foody","full_name":"AT-PHPIntership/foody","owner":{"login":"AT-PHPIntership","id":17865237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3ODY1MjM3","avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/foody","description":"Foody","fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/foody","forks_url":"https://api.github.com/repos/AT-PHPIntership/foody/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/foody/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/foody/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/foody/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/foody/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/foody/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/foody/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/foody/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/foody/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/foody/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/foody/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/foody/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/foody/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/foody/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/foody/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/foody/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/foody/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/foody/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/foody/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/foody/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/foody/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/foody/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/foody/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/foody/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/foody/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/foody/deployments","created_at":"2018-07-19T02:19:45Z","updated_at":"2018-08-02T03:26:43Z","pushed_at":"2018-08-02T04:22:04Z","git_url":"git://github.com/AT-PHPIntership/foody.git","ssh_url":"git@github.com:AT-PHPIntership/foody.git","clone_url":"https://github.com/AT-PHPIntership/foody.git","svn_url":"https://github.com/AT-PHPIntership/foody","homepage":null,"size":744,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13"},"html":{"href":"https://github.com/AT-PHPIntership/foody/pull/13"},"issue":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/issues/13"},"comments":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/AT-PHPIntership/foody/statuses/12abc2ab1cb5402fc9861b599cdc5ea95f31e643"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"at-quangtran"}}