{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/comments/113443735","pull_request_review_id":34831595,"id":113443735,"diff_hunk":"@@ -0,0 +1,256 @@\n+/**\n+This file is part of the Juju GUI, which lets users view and manage Juju\n+environments within a graphical interface (https://launchpad.net/juju-gui).\n+Copyright (C) 2017 Canonical Ltd.\n+\n+This program is free software: you can redistribute it and/or modify it under\n+the terms of the GNU Affero General Public License version 3, as published by\n+the Free Software Foundation.\n+\n+This program is distributed in the hope that it will be useful, but WITHOUT\n+ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,\n+SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero\n+General Public License for more details.\n+\n+You should have received a copy of the GNU Affero General Public License along\n+with this program.  If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+'use strict';\n+\n+describe('Bakery', () => {\n+  let bakery, fakeLocalStorage, macaroonlib, Y, storage, client;\n+\n+  beforeAll((done) => {\n+    Y = YUI().use(['juju-env-bakery', 'macaroon'], (y) => {\n+      Y = y;\n+      macaroonlib = Y.macaroon;\n+      done();\n+    });\n+  });\n+\n+  beforeEach(() => {\n+    fakeLocalStorage = {\n+      store: {},\n+      getItem: function(item) {\n+        return this.store[item];\n+      },\n+      setItem: function(item, value) {\n+        this.store[item] = value;\n+      },\n+      removeItem: function(item) {\n+        delete this.store[item];\n+      }\n+    };\n+\n+    client = {\n+      _sendRequest: sinon.stub(),\n+      sendGetRequest: function(...args) {\n+        this._sendRequest('get', ...args);\n+      },\n+      sendPostRequest: function(...args) {\n+        this._sendRequest('post', ...args);\n+      },\n+      sendPutRequest: function(...args) {\n+        this._sendRequest('put', ...args);\n+      },\n+      sendDeleteRequest: function(...args) {\n+        this._sendRequest('delete', ...args);\n+      },\n+      sendPatchRequest: function(...args) {\n+        this._sendRequest('patch', ...args);\n+      },\n+    };\n+\n+    storage = new Y.juju.environments.web.BakeryStorage(\n+      fakeLocalStorage, {services: {charmstore: 'http://example.com/'}});\n+    bakery = new Y.juju.environments.web.Bakery(client, storage);\n+  });\n+\n+  afterEach(() => {\n+    bakery = null;\n+  });\n+\n+  it('exists', () => {\n+    bakery = new Y.juju.environments.web.Bakery({});","path":"jujugui/static/gui/src/test/test-bakery.js","position":75,"original_position":75,"commit_id":"a00ac8e3e1c5ed86fd008761773eb60216a0856f","original_commit_id":"a00ac8e3e1c5ed86fd008761773eb60216a0856f","user":{"login":"jaycee","id":26728,"avatar_url":"https://avatars0.githubusercontent.com/u/26728?v=3","gravatar_id":"","url":"https://api.github.com/users/jaycee","html_url":"https://github.com/jaycee","followers_url":"https://api.github.com/users/jaycee/followers","following_url":"https://api.github.com/users/jaycee/following{/other_user}","gists_url":"https://api.github.com/users/jaycee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaycee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaycee/subscriptions","organizations_url":"https://api.github.com/users/jaycee/orgs","repos_url":"https://api.github.com/users/jaycee/repos","events_url":"https://api.github.com/users/jaycee/events{/privacy}","received_events_url":"https://api.github.com/users/jaycee/received_events","type":"User","site_admin":false},"body":"Yeah, this didn't get updated after I moved bakery creation into beforeEach","created_at":"2017-04-26T12:58:14Z","updated_at":"2017-04-26T12:58:14Z","html_url":"https://github.com/juju/juju-gui/pull/2804#discussion_r113443735","pull_request_url":"https://api.github.com/repos/juju/juju-gui/pulls/2804","_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments/113443735"},"html":{"href":"https://github.com/juju/juju-gui/pull/2804#discussion_r113443735"},"pull_request":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/2804"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju-gui/pulls/2804","id":117620174,"html_url":"https://github.com/juju/juju-gui/pull/2804","diff_url":"https://github.com/juju/juju-gui/pull/2804.diff","patch_url":"https://github.com/juju/juju-gui/pull/2804.patch","issue_url":"https://api.github.com/repos/juju/juju-gui/issues/2804","number":2804,"state":"open","locked":false,"title":"Adds test coverage to new bakery","user":{"login":"jaycee","id":26728,"avatar_url":"https://avatars0.githubusercontent.com/u/26728?v=3","gravatar_id":"","url":"https://api.github.com/users/jaycee","html_url":"https://github.com/jaycee","followers_url":"https://api.github.com/users/jaycee/followers","following_url":"https://api.github.com/users/jaycee/following{/other_user}","gists_url":"https://api.github.com/users/jaycee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaycee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaycee/subscriptions","organizations_url":"https://api.github.com/users/jaycee/orgs","repos_url":"https://api.github.com/users/jaycee/repos","events_url":"https://api.github.com/users/jaycee/events{/privacy}","received_events_url":"https://api.github.com/users/jaycee/received_events","type":"User","site_admin":false},"body":null,"created_at":"2017-04-26T02:37:06Z","updated_at":"2017-04-26T12:58:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d263625810dbab04520fbfd7ace8cd6d10b0e72b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju-gui/pulls/2804/commits","review_comments_url":"https://api.github.com/repos/juju/juju-gui/pulls/2804/comments","review_comment_url":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju-gui/issues/2804/comments","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/a00ac8e3e1c5ed86fd008761773eb60216a0856f","head":{"label":"jaycee:new-bakery-tests","ref":"new-bakery-tests","sha":"a00ac8e3e1c5ed86fd008761773eb60216a0856f","user":{"login":"jaycee","id":26728,"avatar_url":"https://avatars0.githubusercontent.com/u/26728?v=3","gravatar_id":"","url":"https://api.github.com/users/jaycee","html_url":"https://github.com/jaycee","followers_url":"https://api.github.com/users/jaycee/followers","following_url":"https://api.github.com/users/jaycee/following{/other_user}","gists_url":"https://api.github.com/users/jaycee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaycee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaycee/subscriptions","organizations_url":"https://api.github.com/users/jaycee/orgs","repos_url":"https://api.github.com/users/jaycee/repos","events_url":"https://api.github.com/users/jaycee/events{/privacy}","received_events_url":"https://api.github.com/users/jaycee/received_events","type":"User","site_admin":false},"repo":{"id":20962584,"name":"juju-gui","full_name":"jaycee/juju-gui","owner":{"login":"jaycee","id":26728,"avatar_url":"https://avatars0.githubusercontent.com/u/26728?v=3","gravatar_id":"","url":"https://api.github.com/users/jaycee","html_url":"https://github.com/jaycee","followers_url":"https://api.github.com/users/jaycee/followers","following_url":"https://api.github.com/users/jaycee/following{/other_user}","gists_url":"https://api.github.com/users/jaycee/gists{/gist_id}","starred_url":"https://api.github.com/users/jaycee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaycee/subscriptions","organizations_url":"https://api.github.com/users/jaycee/orgs","repos_url":"https://api.github.com/users/jaycee/repos","events_url":"https://api.github.com/users/jaycee/events{/privacy}","received_events_url":"https://api.github.com/users/jaycee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaycee/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://juju.ubuntu.com/>.","fork":true,"url":"https://api.github.com/repos/jaycee/juju-gui","forks_url":"https://api.github.com/repos/jaycee/juju-gui/forks","keys_url":"https://api.github.com/repos/jaycee/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaycee/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaycee/juju-gui/teams","hooks_url":"https://api.github.com/repos/jaycee/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/jaycee/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/jaycee/juju-gui/events","assignees_url":"https://api.github.com/repos/jaycee/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/jaycee/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/jaycee/juju-gui/tags","blobs_url":"https://api.github.com/repos/jaycee/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaycee/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaycee/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaycee/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaycee/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/jaycee/juju-gui/languages","stargazers_url":"https://api.github.com/repos/jaycee/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/jaycee/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/jaycee/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/jaycee/juju-gui/subscription","commits_url":"https://api.github.com/repos/jaycee/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaycee/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaycee/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaycee/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaycee/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/jaycee/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaycee/juju-gui/merges","archive_url":"https://api.github.com/repos/jaycee/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaycee/juju-gui/downloads","issues_url":"https://api.github.com/repos/jaycee/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/jaycee/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/jaycee/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/jaycee/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaycee/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/jaycee/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/jaycee/juju-gui/deployments","created_at":"2014-06-18T13:16:17Z","updated_at":"2016-01-11T14:18:32Z","pushed_at":"2017-04-26T02:43:37Z","git_url":"git://github.com/jaycee/juju-gui.git","ssh_url":"git@github.com:jaycee/juju-gui.git","clone_url":"https://github.com/jaycee/juju-gui.git","svn_url":"https://github.com/jaycee/juju-gui","homepage":null,"size":121830,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"develop"}},"base":{"label":"juju:new-bakery","ref":"new-bakery","sha":"f8fa50d2ccb0367ed517e939b4e607826b01b5ac","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars3.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":14960387,"name":"juju-gui","full_name":"juju/juju-gui","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars3.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju-gui","description":"Juju-GUI is a web-based GUI for Juju <https://jujucharms.com/>.","fork":false,"url":"https://api.github.com/repos/juju/juju-gui","forks_url":"https://api.github.com/repos/juju/juju-gui/forks","keys_url":"https://api.github.com/repos/juju/juju-gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju-gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju-gui/teams","hooks_url":"https://api.github.com/repos/juju/juju-gui/hooks","issue_events_url":"https://api.github.com/repos/juju/juju-gui/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju-gui/events","assignees_url":"https://api.github.com/repos/juju/juju-gui/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju-gui/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju-gui/tags","blobs_url":"https://api.github.com/repos/juju/juju-gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju-gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju-gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju-gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju-gui/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju-gui/languages","stargazers_url":"https://api.github.com/repos/juju/juju-gui/stargazers","contributors_url":"https://api.github.com/repos/juju/juju-gui/contributors","subscribers_url":"https://api.github.com/repos/juju/juju-gui/subscribers","subscription_url":"https://api.github.com/repos/juju/juju-gui/subscription","commits_url":"https://api.github.com/repos/juju/juju-gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju-gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju-gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju-gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju-gui/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju-gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju-gui/merges","archive_url":"https://api.github.com/repos/juju/juju-gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju-gui/downloads","issues_url":"https://api.github.com/repos/juju/juju-gui/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju-gui/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju-gui/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju-gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju-gui/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju-gui/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju-gui/deployments","created_at":"2013-12-05T17:15:48Z","updated_at":"2017-04-09T19:02:32Z","pushed_at":"2017-04-26T08:12:58Z","git_url":"git://github.com/juju/juju-gui.git","ssh_url":"git@github.com:juju/juju-gui.git","clone_url":"https://github.com/juju/juju-gui.git","svn_url":"https://github.com/juju/juju-gui","homepage":"","size":121952,"stargazers_count":113,"watchers_count":113,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":132,"forks":64,"open_issues":132,"watchers":113,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/2804"},"html":{"href":"https://github.com/juju/juju-gui/pull/2804"},"issue":{"href":"https://api.github.com/repos/juju/juju-gui/issues/2804"},"comments":{"href":"https://api.github.com/repos/juju/juju-gui/issues/2804/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/2804/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju-gui/pulls/2804/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju-gui/statuses/a00ac8e3e1c5ed86fd008761773eb60216a0856f"}}}}
{"actor":{"display_login":"jaycee"}}