{"action":"created","comment":{"url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/comments/37435574","id":37435574,"diff_hunk":"@@ -0,0 +1,58 @@\n+'use strict';\n+describe('directive: last revised', function() {\n+  beforeEach(module('risevision.editorApp.directives'));\n+\n+  var elm, $scope, $compile;\n+\n+  beforeEach(inject(function($rootScope, _$compile_, $templateCache) {\n+    $templateCache.put('partials/last-revised.html', '<p id=\"status\">{{status}}</p>');\n+    $scope = $rootScope.$new();\n+    $compile = _$compile_;\n+  }));\n+\n+  function compileDirective() {\n+    var tpl = '<last-revised revision-status=\"presentation.revisionStatus\" change-date=\"presentation.changeDate\" changed-by=\"presentation.changedBy\"></last-revised>';\n+\n+    inject(function($compile) {\n+      elm = $compile(tpl)($scope);\n+    });\n+\n+    $scope.$digest();\n+  }\n+\n+  it('should compile html', function() {\n+    compileDirective();\n+\n+    expect(elm.html()).to.equal('<p id=\"status\" class=\"ng-binding\">Saved</p>');\n+  });\n+  \n+  describe('revisionStatus: ', function() {\n+    it('should show Revised', function() {\n+      $scope.presentation = {\n+        revisionStatus: 1\n+      };\n+\n+      compileDirective();\n+      \n+      expect(elm.html()).to.equal('<p id=\"status\" class=\"ng-binding\">Revised</p>');\n+    });\n+\n+    it('should show Published', function() {\n+      $scope.presentation = {\n+        revisionStatus: 0\n+      };\n+      \n+      compileDirective();\n+      \n+      expect(elm.html()).to.equal('<p id=\"status\" class=\"ng-binding\">Published</p>');\n+    });\n+\n+  });\n+  \n+  it('directive scope: ', function() {\n+    compileDirective();\n+    \n+    expect(elm.isolateScope().changedBy).to.equal('N/A');\n+    expect(elm.isolateScope().status).to.equal('Saved');\n+  });","path":"test/unit/directives/dtv-last-revised.tests.js","position":57,"original_position":57,"commit_id":"e1b40604d92ef1f30ac2779b4dcbef3124aa5160","original_commit_id":"e1b40604d92ef1f30ac2779b4dcbef3124aa5160","user":{"login":"alex-deaconu","id":6218188,"avatar_url":"https://avatars.githubusercontent.com/u/6218188?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-deaconu","html_url":"https://github.com/alex-deaconu","followers_url":"https://api.github.com/users/alex-deaconu/followers","following_url":"https://api.github.com/users/alex-deaconu/following{/other_user}","gists_url":"https://api.github.com/users/alex-deaconu/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-deaconu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-deaconu/subscriptions","organizations_url":"https://api.github.com/users/alex-deaconu/orgs","repos_url":"https://api.github.com/users/alex-deaconu/repos","events_url":"https://api.github.com/users/alex-deaconu/events{/privacy}","received_events_url":"https://api.github.com/users/alex-deaconu/received_events","type":"User","site_admin":false},"body":"@rodrigopavezi @ezequielc FYI. Take a look at this test specifically: this is how to access the directive's isolated scope variables in a unit test. Thanks.","created_at":"2015-08-19T16:29:39Z","updated_at":"2015-08-19T16:29:39Z","html_url":"https://github.com/Rise-Vision/editor-app/pull/9#discussion_r37435574","pull_request_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/comments/37435574"},"html":{"href":"https://github.com/Rise-Vision/editor-app/pull/9#discussion_r37435574"},"pull_request":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9","id":42833976,"html_url":"https://github.com/Rise-Vision/editor-app/pull/9","diff_url":"https://github.com/Rise-Vision/editor-app/pull/9.diff","patch_url":"https://github.com/Rise-Vision/editor-app/pull/9.patch","issue_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/9","number":9,"state":"open","locked":false,"title":"Create footer directive","user":{"login":"alex-deaconu","id":6218188,"avatar_url":"https://avatars.githubusercontent.com/u/6218188?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-deaconu","html_url":"https://github.com/alex-deaconu","followers_url":"https://api.github.com/users/alex-deaconu/followers","following_url":"https://api.github.com/users/alex-deaconu/following{/other_user}","gists_url":"https://api.github.com/users/alex-deaconu/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-deaconu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-deaconu/subscriptions","organizations_url":"https://api.github.com/users/alex-deaconu/orgs","repos_url":"https://api.github.com/users/alex-deaconu/repos","events_url":"https://api.github.com/users/alex-deaconu/events{/privacy}","received_events_url":"https://api.github.com/users/alex-deaconu/received_events","type":"User","site_admin":false},"body":"Bound actions to factory\r\nShowing/hiding buttons according to revision status\r\nHide delete button for new presentations\r\nRevision status last modified directive","created_at":"2015-08-19T16:16:35Z","updated_at":"2015-08-19T16:29:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96c7c9c153658289224ae05769c551bf33f96aae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9/commits","review_comments_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9/comments","review_comment_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/9/comments","statuses_url":"https://api.github.com/repos/Rise-Vision/editor-app/statuses/e1b40604d92ef1f30ac2779b4dcbef3124aa5160","head":{"label":"Rise-Vision:feature/footer","ref":"feature/footer","sha":"e1b40604d92ef1f30ac2779b4dcbef3124aa5160","user":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars.githubusercontent.com/u/6840223?v=3","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"repo":{"id":40659254,"name":"editor-app","full_name":"Rise-Vision/editor-app","owner":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars.githubusercontent.com/u/6840223?v=3","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rise-Vision/editor-app","description":"An editor for managing Rise Vision presentations ","fork":false,"url":"https://api.github.com/repos/Rise-Vision/editor-app","forks_url":"https://api.github.com/repos/Rise-Vision/editor-app/forks","keys_url":"https://api.github.com/repos/Rise-Vision/editor-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rise-Vision/editor-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rise-Vision/editor-app/teams","hooks_url":"https://api.github.com/repos/Rise-Vision/editor-app/hooks","issue_events_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/events{/number}","events_url":"https://api.github.com/repos/Rise-Vision/editor-app/events","assignees_url":"https://api.github.com/repos/Rise-Vision/editor-app/assignees{/user}","branches_url":"https://api.github.com/repos/Rise-Vision/editor-app/branches{/branch}","tags_url":"https://api.github.com/repos/Rise-Vision/editor-app/tags","blobs_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rise-Vision/editor-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Rise-Vision/editor-app/languages","stargazers_url":"https://api.github.com/repos/Rise-Vision/editor-app/stargazers","contributors_url":"https://api.github.com/repos/Rise-Vision/editor-app/contributors","subscribers_url":"https://api.github.com/repos/Rise-Vision/editor-app/subscribers","subscription_url":"https://api.github.com/repos/Rise-Vision/editor-app/subscription","commits_url":"https://api.github.com/repos/Rise-Vision/editor-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rise-Vision/editor-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rise-Vision/editor-app/contents/{+path}","compare_url":"https://api.github.com/repos/Rise-Vision/editor-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rise-Vision/editor-app/merges","archive_url":"https://api.github.com/repos/Rise-Vision/editor-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rise-Vision/editor-app/downloads","issues_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues{/number}","pulls_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Rise-Vision/editor-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Rise-Vision/editor-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rise-Vision/editor-app/labels{/name}","releases_url":"https://api.github.com/repos/Rise-Vision/editor-app/releases{/id}","created_at":"2015-08-13T13:07:02Z","updated_at":"2015-08-13T20:31:56Z","pushed_at":"2015-08-19T16:28:16Z","git_url":"git://github.com/Rise-Vision/editor-app.git","ssh_url":"git@github.com:Rise-Vision/editor-app.git","clone_url":"https://github.com/Rise-Vision/editor-app.git","svn_url":"https://github.com/Rise-Vision/editor-app","homepage":null,"size":0,"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":"Rise-Vision:master","ref":"master","sha":"5ec73d1e5bc2c74bd6599b74471be2ef26389332","user":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars.githubusercontent.com/u/6840223?v=3","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"repo":{"id":40659254,"name":"editor-app","full_name":"Rise-Vision/editor-app","owner":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars.githubusercontent.com/u/6840223?v=3","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rise-Vision/editor-app","description":"An editor for managing Rise Vision presentations ","fork":false,"url":"https://api.github.com/repos/Rise-Vision/editor-app","forks_url":"https://api.github.com/repos/Rise-Vision/editor-app/forks","keys_url":"https://api.github.com/repos/Rise-Vision/editor-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rise-Vision/editor-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rise-Vision/editor-app/teams","hooks_url":"https://api.github.com/repos/Rise-Vision/editor-app/hooks","issue_events_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/events{/number}","events_url":"https://api.github.com/repos/Rise-Vision/editor-app/events","assignees_url":"https://api.github.com/repos/Rise-Vision/editor-app/assignees{/user}","branches_url":"https://api.github.com/repos/Rise-Vision/editor-app/branches{/branch}","tags_url":"https://api.github.com/repos/Rise-Vision/editor-app/tags","blobs_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rise-Vision/editor-app/statuses/{sha}","languages_url":"https://api.github.com/repos/Rise-Vision/editor-app/languages","stargazers_url":"https://api.github.com/repos/Rise-Vision/editor-app/stargazers","contributors_url":"https://api.github.com/repos/Rise-Vision/editor-app/contributors","subscribers_url":"https://api.github.com/repos/Rise-Vision/editor-app/subscribers","subscription_url":"https://api.github.com/repos/Rise-Vision/editor-app/subscription","commits_url":"https://api.github.com/repos/Rise-Vision/editor-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rise-Vision/editor-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rise-Vision/editor-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rise-Vision/editor-app/contents/{+path}","compare_url":"https://api.github.com/repos/Rise-Vision/editor-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rise-Vision/editor-app/merges","archive_url":"https://api.github.com/repos/Rise-Vision/editor-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rise-Vision/editor-app/downloads","issues_url":"https://api.github.com/repos/Rise-Vision/editor-app/issues{/number}","pulls_url":"https://api.github.com/repos/Rise-Vision/editor-app/pulls{/number}","milestones_url":"https://api.github.com/repos/Rise-Vision/editor-app/milestones{/number}","notifications_url":"https://api.github.com/repos/Rise-Vision/editor-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rise-Vision/editor-app/labels{/name}","releases_url":"https://api.github.com/repos/Rise-Vision/editor-app/releases{/id}","created_at":"2015-08-13T13:07:02Z","updated_at":"2015-08-13T20:31:56Z","pushed_at":"2015-08-19T16:28:16Z","git_url":"git://github.com/Rise-Vision/editor-app.git","ssh_url":"git@github.com:Rise-Vision/editor-app.git","clone_url":"https://github.com/Rise-Vision/editor-app.git","svn_url":"https://github.com/Rise-Vision/editor-app","homepage":null,"size":0,"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/Rise-Vision/editor-app/pulls/9"},"html":{"href":"https://github.com/Rise-Vision/editor-app/pull/9"},"issue":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/issues/9"},"comments":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/Rise-Vision/editor-app/statuses/e1b40604d92ef1f30ac2779b4dcbef3124aa5160"}}}}