{"action":"created","comment":{"url":"https://api.github.com/repos/michabeeri/Markbook/pulls/comments/53998858","id":53998858,"diff_hunk":"@@ -0,0 +1,77 @@\n+define(['react', 'components/mainView/topbar'],\n+    function (React, TopBar) {\n+        'use strict';\n+\n+        var testUtils = React.addons.TestUtils;\n+\n+        describe('top bar', function () {\n+            it('should show the logo of the app', function () {\n+                var props = {\n+                    username: 'username'\n+                };\n+                var topBarElement = React.createElement(TopBar, props);\n+                var topBarComp = testUtils.renderIntoDocument(topBarElement);\n+\n+                expect(function () {\n+                    testUtils.findRenderedDOMComponentWithClass(topBarComp, 'top-bar-logo');\n+                }).not.toThrowError();\n+            });\n+\n+            it('should show the name of the app', function () {\n+                var props = {\n+                    username: 'username'\n+                };\n+                var topBarElement = React.createElement(TopBar, props);\n+                var topBarComp = testUtils.renderIntoDocument(topBarElement);\n+\n+                expect(function () {\n+                    testUtils.findRenderedDOMComponentWithClass(topBarComp, 'top-bar-name');\n+                }).not.toThrowError();\n+\n+            });\n+\n+            it('should show the email of the connected user', function () {\n+                var props = {\n+                    username: 'username'\n+                };\n+                var topBarElement = React.createElement(TopBar, props);\n+                var topBarComp = testUtils.renderIntoDocument(topBarElement);\n+\n+                var usernameNode = null;\n+                expect(function () {\n+                    usernameNode = testUtils.findRenderedDOMComponentWithClass(topBarComp, 'top-bar-username');\n+                }).not.toThrowError();\n+\n+                expect(usernameNode).not.toBeNull();\n+                expect(usernameNode.innerHTML).toEqual(props.username);\n+\n+            });\n+\n+            it('should show a log out button', function () {\n+                var props = {\n+                    username: 'username'\n+                };\n+                var topBarElement = React.createElement(TopBar, props);\n+                var topBarComp = testUtils.renderIntoDocument(topBarElement);\n+\n+                var usernameNode = null;\n+                expect(function () {\n+                    usernameNode = testUtils.findRenderedDOMComponentWithClass(topBarComp, 'logout-btn');\n+                }).not.toThrowError();\n+\n+                expect(usernameNode).not.toBeNull();","path":"src/tests/components/mainView/topbar.spec.js","position":62,"original_position":62,"commit_id":"17fdb3dc24515f19734869a8892e284d49baf219","original_commit_id":"1a74a0a4dff0075e88f9a54429e6dbbb4f4274e2","user":{"login":"michabeeri","id":16486499,"avatar_url":"https://avatars.githubusercontent.com/u/16486499?v=3","gravatar_id":"","url":"https://api.github.com/users/michabeeri","html_url":"https://github.com/michabeeri","followers_url":"https://api.github.com/users/michabeeri/followers","following_url":"https://api.github.com/users/michabeeri/following{/other_user}","gists_url":"https://api.github.com/users/michabeeri/gists{/gist_id}","starred_url":"https://api.github.com/users/michabeeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michabeeri/subscriptions","organizations_url":"https://api.github.com/users/michabeeri/orgs","repos_url":"https://api.github.com/users/michabeeri/repos","events_url":"https://api.github.com/users/michabeeri/events{/privacy}","received_events_url":"https://api.github.com/users/michabeeri/received_events","type":"User","site_admin":false},"body":"same here","created_at":"2016-02-24T20:09:47Z","updated_at":"2016-02-24T20:09:47Z","html_url":"https://github.com/michabeeri/Markbook/pull/2#discussion_r53998858","pull_request_url":"https://api.github.com/repos/michabeeri/Markbook/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/comments/53998858"},"html":{"href":"https://github.com/michabeeri/Markbook/pull/2#discussion_r53998858"},"pull_request":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/michabeeri/Markbook/pulls/2","id":60561799,"html_url":"https://github.com/michabeeri/Markbook/pull/2","diff_url":"https://github.com/michabeeri/Markbook/pull/2.diff","patch_url":"https://github.com/michabeeri/Markbook/pull/2.patch","issue_url":"https://api.github.com/repos/michabeeri/Markbook/issues/2","number":2,"state":"open","locked":false,"title":"topbar","user":{"login":"yaelavgil","id":16478645,"avatar_url":"https://avatars.githubusercontent.com/u/16478645?v=3","gravatar_id":"","url":"https://api.github.com/users/yaelavgil","html_url":"https://github.com/yaelavgil","followers_url":"https://api.github.com/users/yaelavgil/followers","following_url":"https://api.github.com/users/yaelavgil/following{/other_user}","gists_url":"https://api.github.com/users/yaelavgil/gists{/gist_id}","starred_url":"https://api.github.com/users/yaelavgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaelavgil/subscriptions","organizations_url":"https://api.github.com/users/yaelavgil/orgs","repos_url":"https://api.github.com/users/yaelavgil/repos","events_url":"https://api.github.com/users/yaelavgil/events{/privacy}","received_events_url":"https://api.github.com/users/yaelavgil/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-24T19:13:13Z","updated_at":"2016-02-24T20:09:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"883fadc3a0970642fde510a290dad91d02714e5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/michabeeri/Markbook/pulls/2/commits","review_comments_url":"https://api.github.com/repos/michabeeri/Markbook/pulls/2/comments","review_comment_url":"https://api.github.com/repos/michabeeri/Markbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/michabeeri/Markbook/issues/2/comments","statuses_url":"https://api.github.com/repos/michabeeri/Markbook/statuses/17fdb3dc24515f19734869a8892e284d49baf219","head":{"label":"michabeeri:topbar","ref":"topbar","sha":"17fdb3dc24515f19734869a8892e284d49baf219","user":{"login":"michabeeri","id":16486499,"avatar_url":"https://avatars.githubusercontent.com/u/16486499?v=3","gravatar_id":"","url":"https://api.github.com/users/michabeeri","html_url":"https://github.com/michabeeri","followers_url":"https://api.github.com/users/michabeeri/followers","following_url":"https://api.github.com/users/michabeeri/following{/other_user}","gists_url":"https://api.github.com/users/michabeeri/gists{/gist_id}","starred_url":"https://api.github.com/users/michabeeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michabeeri/subscriptions","organizations_url":"https://api.github.com/users/michabeeri/orgs","repos_url":"https://api.github.com/users/michabeeri/repos","events_url":"https://api.github.com/users/michabeeri/events{/privacy}","received_events_url":"https://api.github.com/users/michabeeri/received_events","type":"User","site_admin":false},"repo":{"id":52432556,"name":"Markbook","full_name":"michabeeri/Markbook","owner":{"login":"michabeeri","id":16486499,"avatar_url":"https://avatars.githubusercontent.com/u/16486499?v=3","gravatar_id":"","url":"https://api.github.com/users/michabeeri","html_url":"https://github.com/michabeeri","followers_url":"https://api.github.com/users/michabeeri/followers","following_url":"https://api.github.com/users/michabeeri/following{/other_user}","gists_url":"https://api.github.com/users/michabeeri/gists{/gist_id}","starred_url":"https://api.github.com/users/michabeeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michabeeri/subscriptions","organizations_url":"https://api.github.com/users/michabeeri/orgs","repos_url":"https://api.github.com/users/michabeeri/repos","events_url":"https://api.github.com/users/michabeeri/events{/privacy}","received_events_url":"https://api.github.com/users/michabeeri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michabeeri/Markbook","description":"","fork":false,"url":"https://api.github.com/repos/michabeeri/Markbook","forks_url":"https://api.github.com/repos/michabeeri/Markbook/forks","keys_url":"https://api.github.com/repos/michabeeri/Markbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michabeeri/Markbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michabeeri/Markbook/teams","hooks_url":"https://api.github.com/repos/michabeeri/Markbook/hooks","issue_events_url":"https://api.github.com/repos/michabeeri/Markbook/issues/events{/number}","events_url":"https://api.github.com/repos/michabeeri/Markbook/events","assignees_url":"https://api.github.com/repos/michabeeri/Markbook/assignees{/user}","branches_url":"https://api.github.com/repos/michabeeri/Markbook/branches{/branch}","tags_url":"https://api.github.com/repos/michabeeri/Markbook/tags","blobs_url":"https://api.github.com/repos/michabeeri/Markbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michabeeri/Markbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michabeeri/Markbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/michabeeri/Markbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michabeeri/Markbook/statuses/{sha}","languages_url":"https://api.github.com/repos/michabeeri/Markbook/languages","stargazers_url":"https://api.github.com/repos/michabeeri/Markbook/stargazers","contributors_url":"https://api.github.com/repos/michabeeri/Markbook/contributors","subscribers_url":"https://api.github.com/repos/michabeeri/Markbook/subscribers","subscription_url":"https://api.github.com/repos/michabeeri/Markbook/subscription","commits_url":"https://api.github.com/repos/michabeeri/Markbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/michabeeri/Markbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/michabeeri/Markbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/michabeeri/Markbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/michabeeri/Markbook/contents/{+path}","compare_url":"https://api.github.com/repos/michabeeri/Markbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michabeeri/Markbook/merges","archive_url":"https://api.github.com/repos/michabeeri/Markbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michabeeri/Markbook/downloads","issues_url":"https://api.github.com/repos/michabeeri/Markbook/issues{/number}","pulls_url":"https://api.github.com/repos/michabeeri/Markbook/pulls{/number}","milestones_url":"https://api.github.com/repos/michabeeri/Markbook/milestones{/number}","notifications_url":"https://api.github.com/repos/michabeeri/Markbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michabeeri/Markbook/labels{/name}","releases_url":"https://api.github.com/repos/michabeeri/Markbook/releases{/id}","deployments_url":"https://api.github.com/repos/michabeeri/Markbook/deployments","created_at":"2016-02-24T10:03:25Z","updated_at":"2016-02-24T10:08:28Z","pushed_at":"2016-02-24T20:00:54Z","git_url":"git://github.com/michabeeri/Markbook.git","ssh_url":"git@github.com:michabeeri/Markbook.git","clone_url":"https://github.com/michabeeri/Markbook.git","svn_url":"https://github.com/michabeeri/Markbook","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"michabeeri:master","ref":"master","sha":"3f37351b2a8587e3917542e0e7cc2992a211fb8c","user":{"login":"michabeeri","id":16486499,"avatar_url":"https://avatars.githubusercontent.com/u/16486499?v=3","gravatar_id":"","url":"https://api.github.com/users/michabeeri","html_url":"https://github.com/michabeeri","followers_url":"https://api.github.com/users/michabeeri/followers","following_url":"https://api.github.com/users/michabeeri/following{/other_user}","gists_url":"https://api.github.com/users/michabeeri/gists{/gist_id}","starred_url":"https://api.github.com/users/michabeeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michabeeri/subscriptions","organizations_url":"https://api.github.com/users/michabeeri/orgs","repos_url":"https://api.github.com/users/michabeeri/repos","events_url":"https://api.github.com/users/michabeeri/events{/privacy}","received_events_url":"https://api.github.com/users/michabeeri/received_events","type":"User","site_admin":false},"repo":{"id":52432556,"name":"Markbook","full_name":"michabeeri/Markbook","owner":{"login":"michabeeri","id":16486499,"avatar_url":"https://avatars.githubusercontent.com/u/16486499?v=3","gravatar_id":"","url":"https://api.github.com/users/michabeeri","html_url":"https://github.com/michabeeri","followers_url":"https://api.github.com/users/michabeeri/followers","following_url":"https://api.github.com/users/michabeeri/following{/other_user}","gists_url":"https://api.github.com/users/michabeeri/gists{/gist_id}","starred_url":"https://api.github.com/users/michabeeri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michabeeri/subscriptions","organizations_url":"https://api.github.com/users/michabeeri/orgs","repos_url":"https://api.github.com/users/michabeeri/repos","events_url":"https://api.github.com/users/michabeeri/events{/privacy}","received_events_url":"https://api.github.com/users/michabeeri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michabeeri/Markbook","description":"","fork":false,"url":"https://api.github.com/repos/michabeeri/Markbook","forks_url":"https://api.github.com/repos/michabeeri/Markbook/forks","keys_url":"https://api.github.com/repos/michabeeri/Markbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michabeeri/Markbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michabeeri/Markbook/teams","hooks_url":"https://api.github.com/repos/michabeeri/Markbook/hooks","issue_events_url":"https://api.github.com/repos/michabeeri/Markbook/issues/events{/number}","events_url":"https://api.github.com/repos/michabeeri/Markbook/events","assignees_url":"https://api.github.com/repos/michabeeri/Markbook/assignees{/user}","branches_url":"https://api.github.com/repos/michabeeri/Markbook/branches{/branch}","tags_url":"https://api.github.com/repos/michabeeri/Markbook/tags","blobs_url":"https://api.github.com/repos/michabeeri/Markbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michabeeri/Markbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michabeeri/Markbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/michabeeri/Markbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michabeeri/Markbook/statuses/{sha}","languages_url":"https://api.github.com/repos/michabeeri/Markbook/languages","stargazers_url":"https://api.github.com/repos/michabeeri/Markbook/stargazers","contributors_url":"https://api.github.com/repos/michabeeri/Markbook/contributors","subscribers_url":"https://api.github.com/repos/michabeeri/Markbook/subscribers","subscription_url":"https://api.github.com/repos/michabeeri/Markbook/subscription","commits_url":"https://api.github.com/repos/michabeeri/Markbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/michabeeri/Markbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/michabeeri/Markbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/michabeeri/Markbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/michabeeri/Markbook/contents/{+path}","compare_url":"https://api.github.com/repos/michabeeri/Markbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michabeeri/Markbook/merges","archive_url":"https://api.github.com/repos/michabeeri/Markbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michabeeri/Markbook/downloads","issues_url":"https://api.github.com/repos/michabeeri/Markbook/issues{/number}","pulls_url":"https://api.github.com/repos/michabeeri/Markbook/pulls{/number}","milestones_url":"https://api.github.com/repos/michabeeri/Markbook/milestones{/number}","notifications_url":"https://api.github.com/repos/michabeeri/Markbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michabeeri/Markbook/labels{/name}","releases_url":"https://api.github.com/repos/michabeeri/Markbook/releases{/id}","deployments_url":"https://api.github.com/repos/michabeeri/Markbook/deployments","created_at":"2016-02-24T10:03:25Z","updated_at":"2016-02-24T10:08:28Z","pushed_at":"2016-02-24T20:00:54Z","git_url":"git://github.com/michabeeri/Markbook.git","ssh_url":"git@github.com:michabeeri/Markbook.git","clone_url":"https://github.com/michabeeri/Markbook.git","svn_url":"https://github.com/michabeeri/Markbook","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/2"},"html":{"href":"https://github.com/michabeeri/Markbook/pull/2"},"issue":{"href":"https://api.github.com/repos/michabeeri/Markbook/issues/2"},"comments":{"href":"https://api.github.com/repos/michabeeri/Markbook/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/michabeeri/Markbook/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/michabeeri/Markbook/statuses/17fdb3dc24515f19734869a8892e284d49baf219"}}}}