{"action":"created","comment":{"url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/comments/46352792","id":46352792,"diff_hunk":"@@ -143,17 +143,17 @@ describe 'Validate function', ->\n     error = integration.validate(pipeline_success: {afid: '1234', cid: '5678'}, lead: fields.buildLeadVars( {first_name: 'Test', last_name: 'Tester', email: 'test@gmail.com', postal_code: '78745', phone_1: '5551212', care_type: null} ))\n     assert.equal error, 'care_type must not be blank'\n \n-  it 'should not allow blank finance when care_type is \\'other\\'', ->\n-    error = integration.validate(pipeline_success: {afid: '1234', cid: '5678'}, lead: fields.buildLeadVars( {first_name: 'Test', last_name: 'Tester', email: 'test@gmail.com', postal_code: '78745', phone_1: '5551212', finance: null, care_type: 'other', trustedform_cert_url: 'www.trustedform.xyz'} ))\n-    assert.equal error, 'finance must not be blank when care_type is other'\n+  it 'should not allow blank finance when care_type is anthing other than \\'in_home\\'', ->\n+    error = integration.validate(pipeline_success: {afid: '1234', cid: '5678'}, lead: fields.buildLeadVars( {first_name: 'Test', last_name: 'Tester', email: 'test@gmail.com', postal_code: '78745', phone_1: '5551212', finance: null, care_type: 'private_pay', trustedform_cert_url: 'www.trustedform.xyz'} ))","path":"spec/create_lead_spec.coffee","position":8,"original_position":8,"commit_id":"bb0019a35abe55c24e5160d7655c864678607359","original_commit_id":"bb0019a35abe55c24e5160d7655c864678607359","user":{"login":"cgrayson","id":5596,"avatar_url":"https://avatars.githubusercontent.com/u/5596?v=3","gravatar_id":"","url":"https://api.github.com/users/cgrayson","html_url":"https://github.com/cgrayson","followers_url":"https://api.github.com/users/cgrayson/followers","following_url":"https://api.github.com/users/cgrayson/following{/other_user}","gists_url":"https://api.github.com/users/cgrayson/gists{/gist_id}","starred_url":"https://api.github.com/users/cgrayson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgrayson/subscriptions","organizations_url":"https://api.github.com/users/cgrayson/orgs","repos_url":"https://api.github.com/users/cgrayson/repos","events_url":"https://api.github.com/users/cgrayson/events{/privacy}","received_events_url":"https://api.github.com/users/cgrayson/received_events","type":"User","site_admin":false},"body":"I guess logically it doesn't matter, since `private_pay` is indeed \"other than 'in_home'\", but that's not a valid value for `care_type`, per `request.variables` metadata.","created_at":"2015-12-01T22:55:14Z","updated_at":"2015-12-01T22:55:14Z","html_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4#discussion_r46352792","pull_request_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/comments/46352792"},"html":{"href":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4#discussion_r46352792"},"pull_request":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4","id":52320422,"html_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4","diff_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4.diff","patch_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4.patch","issue_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/4","number":4,"state":"open","locked":false,"title":"Update validate","user":{"login":"ros3bud","id":3402403,"avatar_url":"https://avatars.githubusercontent.com/u/3402403?v=3","gravatar_id":"","url":"https://api.github.com/users/ros3bud","html_url":"https://github.com/ros3bud","followers_url":"https://api.github.com/users/ros3bud/followers","following_url":"https://api.github.com/users/ros3bud/following{/other_user}","gists_url":"https://api.github.com/users/ros3bud/gists{/gist_id}","starred_url":"https://api.github.com/users/ros3bud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros3bud/subscriptions","organizations_url":"https://api.github.com/users/ros3bud/orgs","repos_url":"https://api.github.com/users/ros3bud/repos","events_url":"https://api.github.com/users/ros3bud/events{/privacy}","received_events_url":"https://api.github.com/users/ros3bud/received_events","type":"User","site_admin":false},"body":"This PR cleans up the code a bit more (per convos with @alexkwolfe) and updates the way the validate function works. See issue #3 for more details. I will rebase once approved. \r\n\r\n@cgrayson, LGTY? ","created_at":"2015-12-01T21:44:12Z","updated_at":"2015-12-01T22:55:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca8e2933fdb61c97e09c8528dbc1c400392fe7ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4/commits","review_comments_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4/comments","review_comment_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/4/comments","statuses_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/statuses/bb0019a35abe55c24e5160d7655c864678607359","head":{"label":"activeprospect:update-validate","ref":"update-validate","sha":"bb0019a35abe55c24e5160d7655c864678607359","user":{"login":"activeprospect","id":245554,"avatar_url":"https://avatars.githubusercontent.com/u/245554?v=3","gravatar_id":"","url":"https://api.github.com/users/activeprospect","html_url":"https://github.com/activeprospect","followers_url":"https://api.github.com/users/activeprospect/followers","following_url":"https://api.github.com/users/activeprospect/following{/other_user}","gists_url":"https://api.github.com/users/activeprospect/gists{/gist_id}","starred_url":"https://api.github.com/users/activeprospect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeprospect/subscriptions","organizations_url":"https://api.github.com/users/activeprospect/orgs","repos_url":"https://api.github.com/users/activeprospect/repos","events_url":"https://api.github.com/users/activeprospect/events{/privacy}","received_events_url":"https://api.github.com/users/activeprospect/received_events","type":"Organization","site_admin":false},"repo":{"id":46001081,"name":"leadconduit-integration-pipeline-success","full_name":"activeprospect/leadconduit-integration-pipeline-success","owner":{"login":"activeprospect","id":245554,"avatar_url":"https://avatars.githubusercontent.com/u/245554?v=3","gravatar_id":"","url":"https://api.github.com/users/activeprospect","html_url":"https://github.com/activeprospect","followers_url":"https://api.github.com/users/activeprospect/followers","following_url":"https://api.github.com/users/activeprospect/following{/other_user}","gists_url":"https://api.github.com/users/activeprospect/gists{/gist_id}","starred_url":"https://api.github.com/users/activeprospect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeprospect/subscriptions","organizations_url":"https://api.github.com/users/activeprospect/orgs","repos_url":"https://api.github.com/users/activeprospect/repos","events_url":"https://api.github.com/users/activeprospect/events{/privacy}","received_events_url":"https://api.github.com/users/activeprospect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success","description":"","fork":false,"url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success","forks_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/forks","keys_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/teams","hooks_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/hooks","issue_events_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/events{/number}","events_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/events","assignees_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/assignees{/user}","branches_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/branches{/branch}","tags_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/tags","blobs_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/refs{/sha}","trees_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/statuses/{sha}","languages_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/languages","stargazers_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/stargazers","contributors_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/contributors","subscribers_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/subscribers","subscription_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/subscription","commits_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/commits{/sha}","git_commits_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/commits{/sha}","comments_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/comments{/number}","issue_comment_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/comments{/number}","contents_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/contents/{+path}","compare_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/merges","archive_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/downloads","issues_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues{/number}","pulls_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls{/number}","milestones_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/milestones{/number}","notifications_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/labels{/name}","releases_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/releases{/id}","created_at":"2015-11-11T18:26:20Z","updated_at":"2015-11-18T16:51:30Z","pushed_at":"2015-12-01T22:19:42Z","git_url":"git://github.com/activeprospect/leadconduit-integration-pipeline-success.git","ssh_url":"git@github.com:activeprospect/leadconduit-integration-pipeline-success.git","clone_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success.git","svn_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"activeprospect:master","ref":"master","sha":"90ed23346c3b79abfb4261fb834b5600255c05bb","user":{"login":"activeprospect","id":245554,"avatar_url":"https://avatars.githubusercontent.com/u/245554?v=3","gravatar_id":"","url":"https://api.github.com/users/activeprospect","html_url":"https://github.com/activeprospect","followers_url":"https://api.github.com/users/activeprospect/followers","following_url":"https://api.github.com/users/activeprospect/following{/other_user}","gists_url":"https://api.github.com/users/activeprospect/gists{/gist_id}","starred_url":"https://api.github.com/users/activeprospect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeprospect/subscriptions","organizations_url":"https://api.github.com/users/activeprospect/orgs","repos_url":"https://api.github.com/users/activeprospect/repos","events_url":"https://api.github.com/users/activeprospect/events{/privacy}","received_events_url":"https://api.github.com/users/activeprospect/received_events","type":"Organization","site_admin":false},"repo":{"id":46001081,"name":"leadconduit-integration-pipeline-success","full_name":"activeprospect/leadconduit-integration-pipeline-success","owner":{"login":"activeprospect","id":245554,"avatar_url":"https://avatars.githubusercontent.com/u/245554?v=3","gravatar_id":"","url":"https://api.github.com/users/activeprospect","html_url":"https://github.com/activeprospect","followers_url":"https://api.github.com/users/activeprospect/followers","following_url":"https://api.github.com/users/activeprospect/following{/other_user}","gists_url":"https://api.github.com/users/activeprospect/gists{/gist_id}","starred_url":"https://api.github.com/users/activeprospect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeprospect/subscriptions","organizations_url":"https://api.github.com/users/activeprospect/orgs","repos_url":"https://api.github.com/users/activeprospect/repos","events_url":"https://api.github.com/users/activeprospect/events{/privacy}","received_events_url":"https://api.github.com/users/activeprospect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success","description":"","fork":false,"url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success","forks_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/forks","keys_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/teams","hooks_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/hooks","issue_events_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/events{/number}","events_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/events","assignees_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/assignees{/user}","branches_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/branches{/branch}","tags_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/tags","blobs_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/refs{/sha}","trees_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/statuses/{sha}","languages_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/languages","stargazers_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/stargazers","contributors_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/contributors","subscribers_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/subscribers","subscription_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/subscription","commits_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/commits{/sha}","git_commits_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/git/commits{/sha}","comments_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/comments{/number}","issue_comment_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/comments{/number}","contents_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/contents/{+path}","compare_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/merges","archive_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/downloads","issues_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues{/number}","pulls_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls{/number}","milestones_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/milestones{/number}","notifications_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/labels{/name}","releases_url":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/releases{/id}","created_at":"2015-11-11T18:26:20Z","updated_at":"2015-11-18T16:51:30Z","pushed_at":"2015-12-01T22:19:42Z","git_url":"git://github.com/activeprospect/leadconduit-integration-pipeline-success.git","ssh_url":"git@github.com:activeprospect/leadconduit-integration-pipeline-success.git","clone_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success.git","svn_url":"https://github.com/activeprospect/leadconduit-integration-pipeline-success","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4"},"html":{"href":"https://github.com/activeprospect/leadconduit-integration-pipeline-success/pull/4"},"issue":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/4"},"comments":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/activeprospect/leadconduit-integration-pipeline-success/statuses/bb0019a35abe55c24e5160d7655c864678607359"}}}}