GitHub PullRequestReviewCommentEvent at 2014-02-20 17:01:59
Repository: edx-platform
Actor: gwprice
Payload: {"comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/9914015","id":9914015,"diff_hunk":"@@ -37,26 +38,38 @@ describe 'ResponseCommentShowView', ->\n         expect(@view.el.tagName.toLowerCase()).toBe 'li'\n \n     it 'is tied to the model', ->\n-        expect(@view.model).toBeDefined();\n+        expect(@view.model).toBeDefined()\n \n     describe 'rendering', ->\n \n         beforeEach ->\n             spyOn(@view, 'renderAttrs')\n             spyOn(@view, 'markAsStaff')\n-            spyOn(@view, 'convertMath')\n \n         it 'produces the correct HTML', ->\n             @view.render()\n             expect(@view.el.innerHTML).toContain('\"discussion-flag-abuse notflagged\"')\n \n         it 'can be flagged for abuse', ->\n-            @response.flagAbuse()\n-            expect(@response.get 'abuse_flaggers').toEqual ['123', '567']\n+            @comment.flagAbuse()\n+            expect(@comment.get 'abuse_flaggers').toEqual ['123', '567']\n \n         it 'can be unflagged for abuse', ->\n             temp_array = []\n             temp_array.push(window.user.get('id'))\n-            @response.set(\"abuse_flaggers\",temp_array)\n-            @response.unflagAbuse()\n-            expect(@response.get 'abuse_flaggers').toEqual []\n+            @comment.set(\"abuse_flaggers\",temp_array)\n+            @comment.unflagAbuse()\n+            expect(@comment.get 'abuse_flaggers').toEqual []\n+\n+    describe 'comment deletion', ->\n+\n+        it 'calls _delete on the view when the delete icon is clicked', ->\n+            DiscussionUtil.loadRoles []\n+            @comment.updateInfo {ability: {'can_delete': true}}\n+            spyOn(@view, \"trigger\")\n+            @view.render()\n+            @view.$el.find('.action-delete').click()\n+            expect(@view.trigger).toHaveBeenCalledWith(\"comment:_delete\", jasmine.any(Object))\n+\n+\n+","path":"common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee","position":77,"original_position":77,"commit_id":"518eaec52238caf4992faa5cc56f653f822402a1","original_commit_id":"518eaec52238caf4992faa5cc56f653f822402a1","user":{"login":"gwprice","id":4027165,"avatar_url":"https://gravatar.com/avatar/12245ad9b7a2b9c562375f6a790fe784?d=https%3A%2F%2Fidenticons.github.com%2F127edbb82f7ba09d548a9b6713afaffa.png&r=x","gravatar_id":"12245ad9b7a2b9c562375f6a790fe784","url":"https://api.github.com/users/gwprice","html_url":"https://github.com/gwprice","followers_url":"https://api.github.com/users/gwprice/followers","following_url":"https://api.github.com/users/gwprice/following{/other_user}","gists_url":"https://api.github.com/users/gwprice/gists{/gist_id}","starred_url":"https://api.github.com/users/gwprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwprice/subscriptions","organizations_url":"https://api.github.com/users/gwprice/orgs","repos_url":"https://api.github.com/users/gwprice/repos","events_url":"https://api.github.com/users/gwprice/events{/privacy}","received_events_url":"https://api.github.com/users/gwprice/received_events","type":"User","site_admin":false},"body":"Remove excess empty lines","created_at":"2014-02-20T17:01:59Z","updated_at":"2014-02-20T17:01:59Z","html_url":"https://github.com/edx/edx-platform/pull/2646#discussion_r9914015","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/2646","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/9914015"},"html":{"href":"https://github.com/edx/edx-platform/pull/2646#discussion_r9914015"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/2646"}}}}