{"action":"created","comment":{"url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/comments/92619750","pull_request_review_id":13138868,"id":92619750,"diff_hunk":"@@ -0,0 +1,98 @@\n+import expect from 'expect';\n+import configureMockStore from 'redux-mock-store';\n+import thunk from 'redux-thunk';\n+import { isFSA } from 'flux-standard-action';\n+\n+import {\n+  fetchBuilds,\n+  fetchBuildsSuccess,\n+  fetchBuildsError\n+} from '../../../../../src/common/actions/snap-builds';\n+import * as ActionTypes from '../../../../../src/common/actions/snap-builds';\n+\n+const middlewares = [ thunk ];\n+const mockStore = configureMockStore(middlewares);\n+\n+describe('repository input actions', () => {\n+  const initialState = {\n+    isFetching: false,\n+    builds: [],\n+    error: false\n+  };\n+\n+  let store;\n+  let action;\n+\n+  beforeEach(() => {\n+    store = mockStore(initialState);\n+  });\n+\n+  context('fetchBuildsSuccess', () => {\n+    let payload = [ { build: 'test1' }, { build: 'test2' }];\n+\n+    beforeEach(() => {\n+      action = fetchBuildsSuccess(payload);\n+    });\n+\n+    it('should create an action to store snap builds', () => {\n+      const expectedAction = {\n+        type: ActionTypes.FETCH_BUILDS_SUCCESS,\n+        payload\n+      };\n+\n+      store.dispatch(action);\n+      expect(store.getActions()).toInclude(expectedAction);\n+    });\n+\n+    it('should create a valid flux standard action', () => {\n+      expect(isFSA(action)).toBe(true);\n+    });\n+  });\n+\n+  context('fetchBuildsError', () => {\n+    let payload = 'Something went wrong!';\n+\n+    beforeEach(() => {\n+      action = fetchBuildsError(payload);\n+    });\n+\n+    it('should create an action to store github repo error on failure', () => {","path":"test/unit/src/common/actions/t_snap-builds.js","position":59,"original_position":59,"commit_id":"13c59e57f06bc782030abca2953537b9067882df","original_commit_id":"13c59e57f06bc782030abca2953537b9067882df","user":{"login":"bartaz","id":83575,"avatar_url":"https://avatars.githubusercontent.com/u/83575?v=3","gravatar_id":"","url":"https://api.github.com/users/bartaz","html_url":"https://github.com/bartaz","followers_url":"https://api.github.com/users/bartaz/followers","following_url":"https://api.github.com/users/bartaz/following{/other_user}","gists_url":"https://api.github.com/users/bartaz/gists{/gist_id}","starred_url":"https://api.github.com/users/bartaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartaz/subscriptions","organizations_url":"https://api.github.com/users/bartaz/orgs","repos_url":"https://api.github.com/users/bartaz/repos","events_url":"https://api.github.com/users/bartaz/events{/privacy}","received_events_url":"https://api.github.com/users/bartaz/received_events","type":"User","site_admin":false},"body":"Good catch. Copy/paste ;)","created_at":"2016-12-15T14:35:35Z","updated_at":"2016-12-15T14:35:35Z","html_url":"https://github.com/canonical-ols/build.snapcraft.io/pull/26#discussion_r92619750","pull_request_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/comments/92619750"},"html":{"href":"https://github.com/canonical-ols/build.snapcraft.io/pull/26#discussion_r92619750"},"pull_request":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26","id":96934889,"html_url":"https://github.com/canonical-ols/build.snapcraft.io/pull/26","diff_url":"https://github.com/canonical-ols/build.snapcraft.io/pull/26.diff","patch_url":"https://github.com/canonical-ols/build.snapcraft.io/pull/26.patch","issue_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/26","number":26,"state":"open","locked":false,"title":"Builds view","user":{"login":"bartaz","id":83575,"avatar_url":"https://avatars.githubusercontent.com/u/83575?v=3","gravatar_id":"","url":"https://api.github.com/users/bartaz","html_url":"https://github.com/bartaz","followers_url":"https://api.github.com/users/bartaz/followers","following_url":"https://api.github.com/users/bartaz/following{/other_user}","gists_url":"https://api.github.com/users/bartaz/gists{/gist_id}","starred_url":"https://api.github.com/users/bartaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartaz/subscriptions","organizations_url":"https://api.github.com/users/bartaz/orgs","repos_url":"https://api.github.com/users/bartaz/repos","events_url":"https://api.github.com/users/bartaz/events{/privacy}","received_events_url":"https://api.github.com/users/bartaz/received_events","type":"User","site_admin":false},"body":"<img width=\"938\" alt=\"screen shot 2016-12-12 at 17 37 26\" src=\"https://cloud.githubusercontent.com/assets/83575/21107375/c1eaddfe-c091-11e6-9986-559bc4658326.png\">\r\n<img width=\"937\" alt=\"screen shot 2016-12-12 at 17 37 42\" src=\"https://cloud.githubusercontent.com/assets/83575/21107376/c1eafe6a-c091-11e6-8e97-c55a2a372e91.png\">\r\n\r\n\r\n\r\n### TODO\r\n\r\n- [x] get mocked data in format compatible with LP (messages, dates, user, etc)\r\n- [x] test snap builds store reducers and actions\r\n- [x] builds listing loading (waiting for builds data to fetch)\r\n- [x] open builds view from GH repo component\r\n- [x] builds listing view/route\r\n- [x] mocked builds listing data\r\n- [x] basic builds listing styling\r\n- [x] single build view/route\r\n- [x] display build log in build view\r\n- [x] remove commit info from view (as it may not be available from API yet)","created_at":"2016-12-07T14:37:02Z","updated_at":"2016-12-15T14:35:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22087588b34c687a972c0ddd384c29d620a71fd4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26/commits","review_comments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26/comments","review_comment_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/26/comments","statuses_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/statuses/13c59e57f06bc782030abca2953537b9067882df","head":{"label":"canonical-ols:builds-view","ref":"builds-view","sha":"13c59e57f06bc782030abca2953537b9067882df","user":{"login":"canonical-ols","id":17836138,"avatar_url":"https://avatars.githubusercontent.com/u/17836138?v=3","gravatar_id":"","url":"https://api.github.com/users/canonical-ols","html_url":"https://github.com/canonical-ols","followers_url":"https://api.github.com/users/canonical-ols/followers","following_url":"https://api.github.com/users/canonical-ols/following{/other_user}","gists_url":"https://api.github.com/users/canonical-ols/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-ols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-ols/subscriptions","organizations_url":"https://api.github.com/users/canonical-ols/orgs","repos_url":"https://api.github.com/users/canonical-ols/repos","events_url":"https://api.github.com/users/canonical-ols/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-ols/received_events","type":"Organization","site_admin":false},"repo":{"id":74463479,"name":"build.snapcraft.io","full_name":"canonical-ols/build.snapcraft.io","owner":{"login":"canonical-ols","id":17836138,"avatar_url":"https://avatars.githubusercontent.com/u/17836138?v=3","gravatar_id":"","url":"https://api.github.com/users/canonical-ols","html_url":"https://github.com/canonical-ols","followers_url":"https://api.github.com/users/canonical-ols/followers","following_url":"https://api.github.com/users/canonical-ols/following{/other_user}","gists_url":"https://api.github.com/users/canonical-ols/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-ols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-ols/subscriptions","organizations_url":"https://api.github.com/users/canonical-ols/orgs","repos_url":"https://api.github.com/users/canonical-ols/repos","events_url":"https://api.github.com/users/canonical-ols/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-ols/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/canonical-ols/build.snapcraft.io","description":"The Snapcraft Build site.","fork":false,"url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io","forks_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/forks","keys_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/teams","hooks_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/hooks","issue_events_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/events{/number}","events_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/events","assignees_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/assignees{/user}","branches_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/branches{/branch}","tags_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/tags","blobs_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/statuses/{sha}","languages_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/languages","stargazers_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/stargazers","contributors_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/contributors","subscribers_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/subscribers","subscription_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/subscription","commits_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/contents/{+path}","compare_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/merges","archive_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/downloads","issues_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues{/number}","pulls_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls{/number}","milestones_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/milestones{/number}","notifications_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/labels{/name}","releases_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/releases{/id}","deployments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/deployments","created_at":"2016-11-22T10:55:35Z","updated_at":"2016-11-23T09:48:21Z","pushed_at":"2016-12-15T13:32:12Z","git_url":"git://github.com/canonical-ols/build.snapcraft.io.git","ssh_url":"git@github.com:canonical-ols/build.snapcraft.io.git","clone_url":"https://github.com/canonical-ols/build.snapcraft.io.git","svn_url":"https://github.com/canonical-ols/build.snapcraft.io","homepage":"","size":137,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"canonical-ols:master","ref":"master","sha":"a69b8ce4a0187416000fba7f50f28eea3d8545b4","user":{"login":"canonical-ols","id":17836138,"avatar_url":"https://avatars.githubusercontent.com/u/17836138?v=3","gravatar_id":"","url":"https://api.github.com/users/canonical-ols","html_url":"https://github.com/canonical-ols","followers_url":"https://api.github.com/users/canonical-ols/followers","following_url":"https://api.github.com/users/canonical-ols/following{/other_user}","gists_url":"https://api.github.com/users/canonical-ols/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-ols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-ols/subscriptions","organizations_url":"https://api.github.com/users/canonical-ols/orgs","repos_url":"https://api.github.com/users/canonical-ols/repos","events_url":"https://api.github.com/users/canonical-ols/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-ols/received_events","type":"Organization","site_admin":false},"repo":{"id":74463479,"name":"build.snapcraft.io","full_name":"canonical-ols/build.snapcraft.io","owner":{"login":"canonical-ols","id":17836138,"avatar_url":"https://avatars.githubusercontent.com/u/17836138?v=3","gravatar_id":"","url":"https://api.github.com/users/canonical-ols","html_url":"https://github.com/canonical-ols","followers_url":"https://api.github.com/users/canonical-ols/followers","following_url":"https://api.github.com/users/canonical-ols/following{/other_user}","gists_url":"https://api.github.com/users/canonical-ols/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-ols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-ols/subscriptions","organizations_url":"https://api.github.com/users/canonical-ols/orgs","repos_url":"https://api.github.com/users/canonical-ols/repos","events_url":"https://api.github.com/users/canonical-ols/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-ols/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/canonical-ols/build.snapcraft.io","description":"The Snapcraft Build site.","fork":false,"url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io","forks_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/forks","keys_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/teams","hooks_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/hooks","issue_events_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/events{/number}","events_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/events","assignees_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/assignees{/user}","branches_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/branches{/branch}","tags_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/tags","blobs_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/statuses/{sha}","languages_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/languages","stargazers_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/stargazers","contributors_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/contributors","subscribers_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/subscribers","subscription_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/subscription","commits_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/contents/{+path}","compare_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/merges","archive_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/downloads","issues_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues{/number}","pulls_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls{/number}","milestones_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/milestones{/number}","notifications_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/labels{/name}","releases_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/releases{/id}","deployments_url":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/deployments","created_at":"2016-11-22T10:55:35Z","updated_at":"2016-11-23T09:48:21Z","pushed_at":"2016-12-15T13:32:12Z","git_url":"git://github.com/canonical-ols/build.snapcraft.io.git","ssh_url":"git@github.com:canonical-ols/build.snapcraft.io.git","clone_url":"https://github.com/canonical-ols/build.snapcraft.io.git","svn_url":"https://github.com/canonical-ols/build.snapcraft.io","homepage":"","size":137,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26"},"html":{"href":"https://github.com/canonical-ols/build.snapcraft.io/pull/26"},"issue":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/26"},"comments":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/canonical-ols/build.snapcraft.io/statuses/13c59e57f06bc782030abca2953537b9067882df"}}}}
{"actor":{"display_login":"bartaz"}}