{"action":"created","comment":{"url":"https://api.github.com/repos/cbitstech/sis_app/pulls/comments/36348180","id":36348180,"diff_hunk":"@@ -2,74 +2,92 @@\n \n var expect = chai.expect;\n \n-describe('RiskyTimesController', function() {\n-    var controller;\n+describe('RiskyTimesController', function () {\n+  var controller, configurationServiceMock,\n+    configurationServiceSaveRiskyTimesSpy,\n+    configurationServiceGetRiskyTimesSpy;\n \n-    beforeEach(module('sis.controllers'));\n+  beforeEach(module('sis.controllers'));\n \n-    beforeEach(inject(function($controller) {\n-        controller = $controller('RiskyTimesController');\n-    }));\n+  beforeEach(module(function ($provide) {\n+    configurationServiceMock = function () {\n+      this.saveRiskyTimes = function () {\n+      };\n+      this.getRiskyTimes = function () {\n+        return []\n+      };\n+      configurationServiceSaveRiskyTimesSpy = sinon.spy(this, 'saveRiskyTimes');\n+      configurationServiceGetRiskyTimesSpy = sinon.spy(this, 'getRiskyTimes');\n+    };\n \n-    describe('#translateDay', function() {\n-        it('returns a Sunday value for \"su\"', function() {\n-            expect(controller.translateDay(controller.SUNDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"m\"', function() {\n-            expect(controller.translateDay(controller.MONDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"tu\"', function() {\n-            expect(controller.translateDay(controller.TUESDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"w\"', function() {\n-            expect(controller.translateDay(controller.WEDNESDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"th\"', function() {\n-            expect(controller.translateDay(controller.THURSDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"f\"', function() {\n-            expect(controller.translateDay(controller.FRIDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n-        it('returns a Sunday value for \"sa\"', function() {\n-            expect(controller.translateDay(controller.SATURDAY_KEY))\n-              .to.equal(controller.riskyTime.day);\n-        });\n+    $provide.service('configurationService', configurationServiceMock);\n+  }));\n+\n+  beforeEach(module('sis.controllers'));\n+\n+  beforeEach(inject(function ($controller) {\n+    controller = $controller('RiskyTimesController');\n+  }));\n+\n+  describe('#translateDay', function () {","path":"test/unit/controllers/RiskyTimesControllerSpec.js","position":66,"original_position":66,"commit_id":"c3806c2b5ddeb0409ba03a914b615a324f03c526","original_commit_id":"c3806c2b5ddeb0409ba03a914b615a324f03c526","user":{"login":"ericcf","id":58693,"avatar_url":"https://avatars.githubusercontent.com/u/58693?v=3","gravatar_id":"","url":"https://api.github.com/users/ericcf","html_url":"https://github.com/ericcf","followers_url":"https://api.github.com/users/ericcf/followers","following_url":"https://api.github.com/users/ericcf/following{/other_user}","gists_url":"https://api.github.com/users/ericcf/gists{/gist_id}","starred_url":"https://api.github.com/users/ericcf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericcf/subscriptions","organizations_url":"https://api.github.com/users/ericcf/orgs","repos_url":"https://api.github.com/users/ericcf/repos","events_url":"https://api.github.com/users/ericcf/events{/privacy}","received_events_url":"https://api.github.com/users/ericcf/received_events","type":"User","site_admin":false},"body":"I don't understand these specs. It looks like `translateDay` doesn't take any arguments.","created_at":"2015-08-05T20:11:38Z","updated_at":"2015-08-05T20:11:38Z","html_url":"https://github.com/cbitstech/sis_app/pull/23#discussion_r36348180","pull_request_url":"https://api.github.com/repos/cbitstech/sis_app/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/cbitstech/sis_app/pulls/comments/36348180"},"html":{"href":"https://github.com/cbitstech/sis_app/pull/23#discussion_r36348180"},"pull_request":{"href":"https://api.github.com/repos/cbitstech/sis_app/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/cbitstech/sis_app/pulls/23","id":41716027,"html_url":"https://github.com/cbitstech/sis_app/pull/23","diff_url":"https://github.com/cbitstech/sis_app/pull/23.diff","patch_url":"https://github.com/cbitstech/sis_app/pull/23.patch","issue_url":"https://api.github.com/repos/cbitstech/sis_app/issues/23","number":23,"state":"open","locked":false,"title":"Evening and morning EMA notifications.","user":{"login":"eschlange","id":4666065,"avatar_url":"https://avatars.githubusercontent.com/u/4666065?v=3","gravatar_id":"","url":"https://api.github.com/users/eschlange","html_url":"https://github.com/eschlange","followers_url":"https://api.github.com/users/eschlange/followers","following_url":"https://api.github.com/users/eschlange/following{/other_user}","gists_url":"https://api.github.com/users/eschlange/gists{/gist_id}","starred_url":"https://api.github.com/users/eschlange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschlange/subscriptions","organizations_url":"https://api.github.com/users/eschlange/orgs","repos_url":"https://api.github.com/users/eschlange/repos","events_url":"https://api.github.com/users/eschlange/events{/privacy}","received_events_url":"https://api.github.com/users/eschlange/received_events","type":"User","site_admin":false},"body":"* Added morning notifications for EMA input.\r\n* Added evening notifications for EMA input.\r\n* Added EMA service and controllers.\r\n* Added spec coverage to all new files.\r\n* Small update to session content and display.\r\n* Added common EMA questions used by both morning and evening notification views.\r\n\r\n[#95522128]","created_at":"2015-08-05T19:24:50Z","updated_at":"2015-08-05T20:11:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45817f912152e4c53fd1b634b2b1de6237d0535f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cbitstech/sis_app/pulls/23/commits","review_comments_url":"https://api.github.com/repos/cbitstech/sis_app/pulls/23/comments","review_comment_url":"https://api.github.com/repos/cbitstech/sis_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbitstech/sis_app/issues/23/comments","statuses_url":"https://api.github.com/repos/cbitstech/sis_app/statuses/c3806c2b5ddeb0409ba03a914b615a324f03c526","head":{"label":"cbitstech:ems-95522128-morning-evening-notifications","ref":"ems-95522128-morning-evening-notifications","sha":"c3806c2b5ddeb0409ba03a914b615a324f03c526","user":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"repo":{"id":36821218,"name":"sis_app","full_name":"cbitstech/sis_app","owner":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbitstech/sis_app","description":"","fork":false,"url":"https://api.github.com/repos/cbitstech/sis_app","forks_url":"https://api.github.com/repos/cbitstech/sis_app/forks","keys_url":"https://api.github.com/repos/cbitstech/sis_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbitstech/sis_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbitstech/sis_app/teams","hooks_url":"https://api.github.com/repos/cbitstech/sis_app/hooks","issue_events_url":"https://api.github.com/repos/cbitstech/sis_app/issues/events{/number}","events_url":"https://api.github.com/repos/cbitstech/sis_app/events","assignees_url":"https://api.github.com/repos/cbitstech/sis_app/assignees{/user}","branches_url":"https://api.github.com/repos/cbitstech/sis_app/branches{/branch}","tags_url":"https://api.github.com/repos/cbitstech/sis_app/tags","blobs_url":"https://api.github.com/repos/cbitstech/sis_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbitstech/sis_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbitstech/sis_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbitstech/sis_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbitstech/sis_app/statuses/{sha}","languages_url":"https://api.github.com/repos/cbitstech/sis_app/languages","stargazers_url":"https://api.github.com/repos/cbitstech/sis_app/stargazers","contributors_url":"https://api.github.com/repos/cbitstech/sis_app/contributors","subscribers_url":"https://api.github.com/repos/cbitstech/sis_app/subscribers","subscription_url":"https://api.github.com/repos/cbitstech/sis_app/subscription","commits_url":"https://api.github.com/repos/cbitstech/sis_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbitstech/sis_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbitstech/sis_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbitstech/sis_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbitstech/sis_app/contents/{+path}","compare_url":"https://api.github.com/repos/cbitstech/sis_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbitstech/sis_app/merges","archive_url":"https://api.github.com/repos/cbitstech/sis_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbitstech/sis_app/downloads","issues_url":"https://api.github.com/repos/cbitstech/sis_app/issues{/number}","pulls_url":"https://api.github.com/repos/cbitstech/sis_app/pulls{/number}","milestones_url":"https://api.github.com/repos/cbitstech/sis_app/milestones{/number}","notifications_url":"https://api.github.com/repos/cbitstech/sis_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbitstech/sis_app/labels{/name}","releases_url":"https://api.github.com/repos/cbitstech/sis_app/releases{/id}","created_at":"2015-06-03T18:05:45Z","updated_at":"2015-06-17T18:28:40Z","pushed_at":"2015-08-05T20:00:35Z","git_url":"git://github.com/cbitstech/sis_app.git","ssh_url":"git@github.com:cbitstech/sis_app.git","clone_url":"https://github.com/cbitstech/sis_app.git","svn_url":"https://github.com/cbitstech/sis_app","homepage":null,"size":1104,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"cbitstech:master","ref":"master","sha":"e3e9547351d5c94ddf67dadcae4142afa63200b2","user":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"repo":{"id":36821218,"name":"sis_app","full_name":"cbitstech/sis_app","owner":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbitstech/sis_app","description":"","fork":false,"url":"https://api.github.com/repos/cbitstech/sis_app","forks_url":"https://api.github.com/repos/cbitstech/sis_app/forks","keys_url":"https://api.github.com/repos/cbitstech/sis_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbitstech/sis_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbitstech/sis_app/teams","hooks_url":"https://api.github.com/repos/cbitstech/sis_app/hooks","issue_events_url":"https://api.github.com/repos/cbitstech/sis_app/issues/events{/number}","events_url":"https://api.github.com/repos/cbitstech/sis_app/events","assignees_url":"https://api.github.com/repos/cbitstech/sis_app/assignees{/user}","branches_url":"https://api.github.com/repos/cbitstech/sis_app/branches{/branch}","tags_url":"https://api.github.com/repos/cbitstech/sis_app/tags","blobs_url":"https://api.github.com/repos/cbitstech/sis_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbitstech/sis_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbitstech/sis_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbitstech/sis_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbitstech/sis_app/statuses/{sha}","languages_url":"https://api.github.com/repos/cbitstech/sis_app/languages","stargazers_url":"https://api.github.com/repos/cbitstech/sis_app/stargazers","contributors_url":"https://api.github.com/repos/cbitstech/sis_app/contributors","subscribers_url":"https://api.github.com/repos/cbitstech/sis_app/subscribers","subscription_url":"https://api.github.com/repos/cbitstech/sis_app/subscription","commits_url":"https://api.github.com/repos/cbitstech/sis_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbitstech/sis_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbitstech/sis_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbitstech/sis_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbitstech/sis_app/contents/{+path}","compare_url":"https://api.github.com/repos/cbitstech/sis_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbitstech/sis_app/merges","archive_url":"https://api.github.com/repos/cbitstech/sis_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbitstech/sis_app/downloads","issues_url":"https://api.github.com/repos/cbitstech/sis_app/issues{/number}","pulls_url":"https://api.github.com/repos/cbitstech/sis_app/pulls{/number}","milestones_url":"https://api.github.com/repos/cbitstech/sis_app/milestones{/number}","notifications_url":"https://api.github.com/repos/cbitstech/sis_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbitstech/sis_app/labels{/name}","releases_url":"https://api.github.com/repos/cbitstech/sis_app/releases{/id}","created_at":"2015-06-03T18:05:45Z","updated_at":"2015-06-17T18:28:40Z","pushed_at":"2015-08-05T20:00:35Z","git_url":"git://github.com/cbitstech/sis_app.git","ssh_url":"git@github.com:cbitstech/sis_app.git","clone_url":"https://github.com/cbitstech/sis_app.git","svn_url":"https://github.com/cbitstech/sis_app","homepage":null,"size":1104,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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/cbitstech/sis_app/pulls/23"},"html":{"href":"https://github.com/cbitstech/sis_app/pull/23"},"issue":{"href":"https://api.github.com/repos/cbitstech/sis_app/issues/23"},"comments":{"href":"https://api.github.com/repos/cbitstech/sis_app/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/cbitstech/sis_app/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/cbitstech/sis_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbitstech/sis_app/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/cbitstech/sis_app/statuses/c3806c2b5ddeb0409ba03a914b615a324f03c526"}}}}