{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/27949662","id":27949662,"diff_hunk":"@@ -118,53 +118,111 @@ describe(\"go.routing (views)\", function() {\n       setUp();\n       diagram = newRoutingDiagram();\n \n-      var model = new ChannelModel({\n-        uuid: 'channel4',\n-        tag: ['invisible_sms', '*181#'],\n-        name: '*181#',\n-        description: 'Invisible Sms: *181#',\n-        endpoints: [\n-          {uuid: 'endpoint80', name: 'default'},\n-          {uuid: 'endpoint81', name: 'secondary'}]\n+      var model = new RouterModel({\n+        uuid: 'router3',\n+        type: 'keyword',\n+        name: 'keyword-router',\n+        description: 'Keyword',\n+        channel_endpoints: [{uuid: 'endpoint12', name: 'default'}],\n+        conversation_endpoints: [\n+          {uuid: 'endpoint13', name: 'default'},\n+          {uuid: 'endpoint14', name: 'default'},\n+          {uuid: 'endpoint15', name: 'default'},\n+          {uuid: 'endpoint16', name: 'default'}\n+        ]\n       });\n \n-      state = diagram.states.add('channels', new RoutingStateView({\n+      state = diagram.states.add('routers', new RouterStateView({\n         model: model,\n         diagram: diagram,\n-        collection: diagram.states.members.get('channels')\n+        collection: diagram.states.members.get('routers')\n       }), {render: false, silent: true});\n+\n     });\n \n     afterEach(function() {\n       tearDown();\n     });\n \n+    describe(\".endpointsForSide\", function() {\n+      it(\"should return the endpoints for a side\", function() {\n+        assert.deepEqual(\n+          state.endpointsForSide('left'),\n+          [state.endpoints.get('endpoint12')]\n+        );\n+        assert.deepEqual(state.endpointsForSide('right'), [\n+          state.endpoints.get('endpoint13'),\n+          state.endpoints.get('endpoint14'),\n+          state.endpoints.get('endpoint15'),\n+          state.endpoints.get('endpoint16')\n+        ]);\n+      });\n+    });\n+\n+    describe(\".findMaxEndpoints\", function() {\n+      it(\"should return the max of two endpoint arrays\", function() {\n+        assert.equal(state.findMaxEndpoints(), 4);\n+      });\n+    });\n+\n+    describe(\".tooManyEndpoints\", function() {\n+      it(\"should check if there are too many endpoints\", function() {\n+        assert.equal(state.tooManyEndpoints(), true);","path":"go/base/static/js/test/routing/views.test.js","position":74,"original_position":74,"commit_id":"f66577f76e2b3733c368ff4a0a2673287e9cc3fd","original_commit_id":"f66577f76e2b3733c368ff4a0a2673287e9cc3fd","user":{"login":"justinvdm","id":1731223,"avatar_url":"https://avatars.githubusercontent.com/u/1731223?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvdm","html_url":"https://github.com/justinvdm","followers_url":"https://api.github.com/users/justinvdm/followers","following_url":"https://api.github.com/users/justinvdm/following{/other_user}","gists_url":"https://api.github.com/users/justinvdm/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvdm/subscriptions","organizations_url":"https://api.github.com/users/justinvdm/orgs","repos_url":"https://api.github.com/users/justinvdm/repos","events_url":"https://api.github.com/users/justinvdm/events{/privacy}","received_events_url":"https://api.github.com/users/justinvdm/received_events","type":"User","site_admin":false},"body":"`<bikeshed>`Could we use `assert()` here since its a boolean check?`</bikeshed>`","created_at":"2015-04-08T07:59:51Z","updated_at":"2015-04-08T07:59:51Z","html_url":"https://github.com/praekelt/vumi-go/pull/1237#discussion_r27949662","pull_request_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237","_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/27949662"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1237#discussion_r27949662"},"pull_request":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237","id":32833812,"html_url":"https://github.com/praekelt/vumi-go/pull/1237","diff_url":"https://github.com/praekelt/vumi-go/pull/1237.diff","patch_url":"https://github.com/praekelt/vumi-go/pull/1237.patch","issue_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1237","number":1237,"state":"open","locked":false,"title":"Feature/issue 1235 busy routers","user":{"login":"SteveBarnett","id":1239497,"avatar_url":"https://avatars.githubusercontent.com/u/1239497?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveBarnett","html_url":"https://github.com/SteveBarnett","followers_url":"https://api.github.com/users/SteveBarnett/followers","following_url":"https://api.github.com/users/SteveBarnett/following{/other_user}","gists_url":"https://api.github.com/users/SteveBarnett/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveBarnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveBarnett/subscriptions","organizations_url":"https://api.github.com/users/SteveBarnett/orgs","repos_url":"https://api.github.com/users/SteveBarnett/repos","events_url":"https://api.github.com/users/SteveBarnett/events{/privacy}","received_events_url":"https://api.github.com/users/SteveBarnett/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-08T07:12:39Z","updated_at":"2015-04-08T07:59:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf0c47f8be363d4c19a46f684e9d7b3c800a0761","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237/commits","review_comments_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237/comments","review_comment_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1237/comments","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/f66577f76e2b3733c368ff4a0a2673287e9cc3fd","head":{"label":"praekelt:feature/issue-1235-busy-routers","ref":"feature/issue-1235-busy-routers","sha":"f66577f76e2b3733c368ff4a0a2673287e9cc3fd","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-04-08T07:55:39Z","pushed_at":"2015-04-08T07:55:39Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":42613,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":113,"forks":14,"open_issues":113,"watchers":16,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"ebe32d4a94db603f9f1dbf5dfa66827fdf3f1548","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-04-08T07:55:39Z","pushed_at":"2015-04-08T07:55:39Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":42613,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":113,"forks":14,"open_issues":113,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1237"},"issue":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1237"},"comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1237/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1237/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/vumi-go/statuses/f66577f76e2b3733c368ff4a0a2673287e9cc3fd"}}}}