{"action":"created","comment":{"url":"https://api.github.com/repos/danliris/dl-module/pulls/comments/92971156","pull_request_review_id":13491917,"id":92971156,"diff_hunk":"@@ -0,0 +1,109 @@\n+require(\"should\");\n+var dataUtil = require(\"../../../data-util/production/finishing-printing/production-order-data-util\");\n+var helper = require(\"../../../helper\");\n+var validate = require(\"dl-models\").validator.production.finishingPrinting.salesContract;\n+\n+var ProductionOrderManager = require(\"../../../../src/managers/production/finishing-printing/production-order-manager\");\n+var productionOrderManager = null;\n+\n+before('#00. connect db', function(done) {\n+    helper.getDb()\n+        .then(db => {\n+            manager = new ProductionOrderManager(db, {\n+                username: 'dev'\n+            });\n+            done();\n+        })\n+        .catch(e => {\n+            done(e);\n+        });\n+});\n+\n+it(\"#01. should error when create with empty data\", function(done) {\n+        manager.create({})\n+            .then((id) => {\n+                done(\"Should not be able to create with empty data\");\n+            })\n+            .catch((e) => {\n+                try {\n+                    e.name.should.equal(\"ValidationError\");\n+                    e.should.have.property(\"errors\");\n+                    e.errors.should.instanceof(Object);\n+                    done();\n+                }\n+                catch (ex) {\n+                    done(e);\n+                }\n+            });\n+    });\n+\n+var createdId;\n+var dataprodOrder;\n+    it(\"#02. should success when create new data\", function(done) {\n+        dataUtil.getNewData()\n+            .then((data) => dataprodOrder=data)\n+            .then((data) =>\n+            manager.create(data))\n+            .then((id) => {\n+                id.should.be.Object();\n+                createdId = id;\n+                done();\n+            })\n+            .catch((e) => {\n+                done(e);\n+            });\n+    });\n+\n+    var createdData;\n+    it(`#03. should success when get created data with id`, function(done) {\n+        manager.getSingleById(createdId)\n+            .then((data) => {\n+                data.should.instanceof(Object);\n+                validate(data);\n+                createdData = data;\n+                done();\n+            })\n+            .catch((e) => {\n+                done(e);\n+            });\n+    });\n+\n+    it(`#04. should success when update created data`, function(done) {","path":"test/production/finishing-printing/production-order/create.js","position":71,"original_position":71,"commit_id":"036c9ddca5799e35ecc5a28ef73b8dca34728653","original_commit_id":"036c9ddca5799e35ecc5a28ef73b8dca34728653","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'template literal syntax' is only available in ES6 (use 'esversion: 6').","created_at":"2016-12-19T05:46:46Z","updated_at":"2016-12-19T05:46:46Z","html_url":"https://github.com/danliris/dl-module/pull/231#discussion_r92971156","pull_request_url":"https://api.github.com/repos/danliris/dl-module/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/comments/92971156"},"html":{"href":"https://github.com/danliris/dl-module/pull/231#discussion_r92971156"},"pull_request":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/danliris/dl-module/pulls/231","id":98510291,"html_url":"https://github.com/danliris/dl-module/pull/231","diff_url":"https://github.com/danliris/dl-module/pull/231.diff","patch_url":"https://github.com/danliris/dl-module/pull/231.patch","issue_url":"https://api.github.com/repos/danliris/dl-module/issues/231","number":231,"state":"open","locked":false,"title":"Adding Production Order","user":{"login":"achensetyawati","id":20510625,"avatar_url":"https://avatars.githubusercontent.com/u/20510625?v=3","gravatar_id":"","url":"https://api.github.com/users/achensetyawati","html_url":"https://github.com/achensetyawati","followers_url":"https://api.github.com/users/achensetyawati/followers","following_url":"https://api.github.com/users/achensetyawati/following{/other_user}","gists_url":"https://api.github.com/users/achensetyawati/gists{/gist_id}","starred_url":"https://api.github.com/users/achensetyawati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achensetyawati/subscriptions","organizations_url":"https://api.github.com/users/achensetyawati/orgs","repos_url":"https://api.github.com/users/achensetyawati/repos","events_url":"https://api.github.com/users/achensetyawati/events{/privacy}","received_events_url":"https://api.github.com/users/achensetyawati/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-19T05:46:40Z","updated_at":"2016-12-19T05:46:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"475761eb625df6890ea9f4cafa0f57921d3831ac","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/danliris/dl-module/pulls/231/commits","review_comments_url":"https://api.github.com/repos/danliris/dl-module/pulls/231/comments","review_comment_url":"https://api.github.com/repos/danliris/dl-module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danliris/dl-module/issues/231/comments","statuses_url":"https://api.github.com/repos/danliris/dl-module/statuses/036c9ddca5799e35ecc5a28ef73b8dca34728653","head":{"label":"achensetyawati:dev","ref":"dev","sha":"036c9ddca5799e35ecc5a28ef73b8dca34728653","user":{"login":"achensetyawati","id":20510625,"avatar_url":"https://avatars.githubusercontent.com/u/20510625?v=3","gravatar_id":"","url":"https://api.github.com/users/achensetyawati","html_url":"https://github.com/achensetyawati","followers_url":"https://api.github.com/users/achensetyawati/followers","following_url":"https://api.github.com/users/achensetyawati/following{/other_user}","gists_url":"https://api.github.com/users/achensetyawati/gists{/gist_id}","starred_url":"https://api.github.com/users/achensetyawati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achensetyawati/subscriptions","organizations_url":"https://api.github.com/users/achensetyawati/orgs","repos_url":"https://api.github.com/users/achensetyawati/repos","events_url":"https://api.github.com/users/achensetyawati/events{/privacy}","received_events_url":"https://api.github.com/users/achensetyawati/received_events","type":"User","site_admin":false},"repo":{"id":64743073,"name":"dl-module","full_name":"achensetyawati/dl-module","owner":{"login":"achensetyawati","id":20510625,"avatar_url":"https://avatars.githubusercontent.com/u/20510625?v=3","gravatar_id":"","url":"https://api.github.com/users/achensetyawati","html_url":"https://github.com/achensetyawati","followers_url":"https://api.github.com/users/achensetyawati/followers","following_url":"https://api.github.com/users/achensetyawati/following{/other_user}","gists_url":"https://api.github.com/users/achensetyawati/gists{/gist_id}","starred_url":"https://api.github.com/users/achensetyawati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achensetyawati/subscriptions","organizations_url":"https://api.github.com/users/achensetyawati/orgs","repos_url":"https://api.github.com/users/achensetyawati/repos","events_url":"https://api.github.com/users/achensetyawati/events{/privacy}","received_events_url":"https://api.github.com/users/achensetyawati/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/achensetyawati/dl-module","description":"Dan Liris Modules","fork":true,"url":"https://api.github.com/repos/achensetyawati/dl-module","forks_url":"https://api.github.com/repos/achensetyawati/dl-module/forks","keys_url":"https://api.github.com/repos/achensetyawati/dl-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/achensetyawati/dl-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/achensetyawati/dl-module/teams","hooks_url":"https://api.github.com/repos/achensetyawati/dl-module/hooks","issue_events_url":"https://api.github.com/repos/achensetyawati/dl-module/issues/events{/number}","events_url":"https://api.github.com/repos/achensetyawati/dl-module/events","assignees_url":"https://api.github.com/repos/achensetyawati/dl-module/assignees{/user}","branches_url":"https://api.github.com/repos/achensetyawati/dl-module/branches{/branch}","tags_url":"https://api.github.com/repos/achensetyawati/dl-module/tags","blobs_url":"https://api.github.com/repos/achensetyawati/dl-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/achensetyawati/dl-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/achensetyawati/dl-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/achensetyawati/dl-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/achensetyawati/dl-module/statuses/{sha}","languages_url":"https://api.github.com/repos/achensetyawati/dl-module/languages","stargazers_url":"https://api.github.com/repos/achensetyawati/dl-module/stargazers","contributors_url":"https://api.github.com/repos/achensetyawati/dl-module/contributors","subscribers_url":"https://api.github.com/repos/achensetyawati/dl-module/subscribers","subscription_url":"https://api.github.com/repos/achensetyawati/dl-module/subscription","commits_url":"https://api.github.com/repos/achensetyawati/dl-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/achensetyawati/dl-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/achensetyawati/dl-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/achensetyawati/dl-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/achensetyawati/dl-module/contents/{+path}","compare_url":"https://api.github.com/repos/achensetyawati/dl-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/achensetyawati/dl-module/merges","archive_url":"https://api.github.com/repos/achensetyawati/dl-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/achensetyawati/dl-module/downloads","issues_url":"https://api.github.com/repos/achensetyawati/dl-module/issues{/number}","pulls_url":"https://api.github.com/repos/achensetyawati/dl-module/pulls{/number}","milestones_url":"https://api.github.com/repos/achensetyawati/dl-module/milestones{/number}","notifications_url":"https://api.github.com/repos/achensetyawati/dl-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/achensetyawati/dl-module/labels{/name}","releases_url":"https://api.github.com/repos/achensetyawati/dl-module/releases{/id}","deployments_url":"https://api.github.com/repos/achensetyawati/dl-module/deployments","created_at":"2016-08-02T09:23:21Z","updated_at":"2016-08-03T03:20:28Z","pushed_at":"2016-12-19T05:46:05Z","git_url":"git://github.com/achensetyawati/dl-module.git","ssh_url":"git@github.com:achensetyawati/dl-module.git","clone_url":"https://github.com/achensetyawati/dl-module.git","svn_url":"https://github.com/achensetyawati/dl-module","homepage":null,"size":1592,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"danliris:dev","ref":"dev","sha":"512bdfd9fb9def4be35add243ed2e7c8b67b275b","user":{"login":"danliris","id":20855729,"avatar_url":"https://avatars.githubusercontent.com/u/20855729?v=3","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"repo":{"id":64628314,"name":"dl-module","full_name":"danliris/dl-module","owner":{"login":"danliris","id":20855729,"avatar_url":"https://avatars.githubusercontent.com/u/20855729?v=3","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danliris/dl-module","description":"Dan Liris Modules","fork":false,"url":"https://api.github.com/repos/danliris/dl-module","forks_url":"https://api.github.com/repos/danliris/dl-module/forks","keys_url":"https://api.github.com/repos/danliris/dl-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/dl-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/dl-module/teams","hooks_url":"https://api.github.com/repos/danliris/dl-module/hooks","issue_events_url":"https://api.github.com/repos/danliris/dl-module/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/dl-module/events","assignees_url":"https://api.github.com/repos/danliris/dl-module/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/dl-module/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/dl-module/tags","blobs_url":"https://api.github.com/repos/danliris/dl-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/dl-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/dl-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/dl-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/dl-module/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/dl-module/languages","stargazers_url":"https://api.github.com/repos/danliris/dl-module/stargazers","contributors_url":"https://api.github.com/repos/danliris/dl-module/contributors","subscribers_url":"https://api.github.com/repos/danliris/dl-module/subscribers","subscription_url":"https://api.github.com/repos/danliris/dl-module/subscription","commits_url":"https://api.github.com/repos/danliris/dl-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/dl-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/dl-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/dl-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/dl-module/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/dl-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/dl-module/merges","archive_url":"https://api.github.com/repos/danliris/dl-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/dl-module/downloads","issues_url":"https://api.github.com/repos/danliris/dl-module/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/dl-module/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/dl-module/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/dl-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/dl-module/labels{/name}","releases_url":"https://api.github.com/repos/danliris/dl-module/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/dl-module/deployments","created_at":"2016-08-01T02:15:05Z","updated_at":"2016-08-08T03:27:08Z","pushed_at":"2016-12-19T05:46:40Z","git_url":"git://github.com/danliris/dl-module.git","ssh_url":"git@github.com:danliris/dl-module.git","clone_url":"https://github.com/danliris/dl-module.git","svn_url":"https://github.com/danliris/dl-module","homepage":null,"size":1655,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/231"},"html":{"href":"https://github.com/danliris/dl-module/pull/231"},"issue":{"href":"https://api.github.com/repos/danliris/dl-module/issues/231"},"comments":{"href":"https://api.github.com/repos/danliris/dl-module/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danliris/dl-module/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/danliris/dl-module/statuses/036c9ddca5799e35ecc5a28ef73b8dca34728653"}}}}
{"actor":{"display_login":"houndci-bot"}}