{"action":"created","comment":{"url":"https://api.github.com/repos/codevise/pageflow/pulls/comments/85328381","pull_request_review_id":6049991,"id":85328381,"diff_hunk":"@@ -0,0 +1,135 @@\n+describe('DeleteRowTableCellView', function() {\n+  support.useFakeTranslations({\n+    'information.delete.cell_title': 'Delete information'\n+  });\n+\n+  it('sets cell title attribute', function() {\n+    var kompromat = new Backbone.Model();\n+    var cell = new pageflow.DeleteRowTableCellView({\n+      column: {\n+        name: 'delete'\n+      },\n+      model: kompromat,\n+      attributeTranslationKeyPrefixes: ['information']\n+    });\n+\n+    cell.render();\n+\n+    expect(cell.ui.removeButton).to.have.$attr('title', 'Delete information');\n+  });\n+\n+  it('displays the delete button', function() {\n+    var kompromat = new Backbone.Model();\n+    var cell = new pageflow.DeleteRowTableCellView({\n+      column: {\n+        name: 'delete'\n+      },\n+      model: kompromat\n+    });\n+\n+    cell.render();\n+\n+    expect(cell.ui.removeButton).to.have.$class('remove');\n+  });\n+\n+  it('displays the delete button when toggleDeleteButton returns true', function() {\n+    var Information = Backbone.Model.extend({\n+      subjectDeceased: function() {\n+        return true;\n+      }\n+    });\n+    var kompromat = new Information;\n+    var cell = new pageflow.DeleteRowTableCellView({\n+      column: {\n+        name: 'delete'\n+      },\n+      model: kompromat,\n+      toggleDeleteButton: 'subjectDeceased'\n+    });\n+\n+    cell.render();\n+\n+    expect(cell.ui.removeButton).to.have.$class('remove');\n+  });\n+\n+  it('does not display the delete button when toggleDeleteButton returns false', function() {\n+    var Information = Backbone.Model.extend({\n+      subjectDeceased: function() {\n+        return false;\n+      }\n+    });\n+    var kompromat = new Information;\n+    var cell = new pageflow.DeleteRowTableCellView({\n+      column: {\n+        name: 'delete'\n+      },\n+      model: kompromat,\n+      toggleDeleteButton: 'subjectDeceased'\n+    });\n+\n+    cell.render();\n+\n+    expect(cell.ui.removeButton).not.to.have.$class('remove');\n+  });\n+\n+  it('displays the delete button when toggleDeleteButton returns false and ' +\n+     'invertToggleDeleteButton is true', function() {\n+       var Information = Backbone.Model.extend({\n+         subjectActive: function() {\n+           return false;\n+         }\n+       });\n+       var kompromat = new Information;\n+       var cell = new pageflow.DeleteRowTableCellView({\n+         column: {\n+           name: 'delete'\n+         },\n+         model: kompromat,\n+         toggleDeleteButton: 'subjectActive',\n+         invertToggleDeleteButton: true\n+       });\n+\n+       cell.render();\n+\n+       expect(cell.ui.removeButton).to.have.$class('remove');\n+     });\n+\n+  it('does not display the delete button when toggleDeleteButton returns true and '+\n+     'invertToggleDeleteButton is true', function() {\n+       var Information = Backbone.Model.extend({\n+         subjectActive: function() {\n+           return true;\n+         }\n+       });\n+       var kompromat = new Information;\n+       var cell = new pageflow.DeleteRowTableCellView({\n+         column: {\n+           name: 'delete'\n+         },\n+         model: kompromat,\n+         toggleDeleteButton: 'subjectActive',\n+         invertToggleDeleteButton: true\n+       });\n+\n+       cell.render();\n+\n+       expect(cell.ui.removeButton).not.to.have.$class('remove');\n+     });\n+\n+  it('removes model when button is clicked', function() {\n+    var kompromat = new Backbone.Model;\n+    destroy_spy = sinon.spy(kompromat, 'destroy');","path":"spec/javascripts/pageflow/ui/views/table_cells/delete_row_table_cell_view_spec.js","position":121,"original_position":121,"commit_id":"5ff59e547c3d24cd6c54d682155a4bfa6ab0f27e","original_commit_id":"5ff59e547c3d24cd6c54d682155a4bfa6ab0f27e","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Identifier 'destroy_spy' is not in camel case.<br>'destroy_spy' is not defined.","created_at":"2016-10-27T12:45:50Z","updated_at":"2016-10-27T12:45:50Z","html_url":"https://github.com/codevise/pageflow/pull/660#discussion_r85328381","pull_request_url":"https://api.github.com/repos/codevise/pageflow/pulls/660","_links":{"self":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/comments/85328381"},"html":{"href":"https://github.com/codevise/pageflow/pull/660#discussion_r85328381"},"pull_request":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/660"}}},"pull_request":{"url":"https://api.github.com/repos/codevise/pageflow/pulls/660","id":90620845,"html_url":"https://github.com/codevise/pageflow/pull/660","diff_url":"https://github.com/codevise/pageflow/pull/660.diff","patch_url":"https://github.com/codevise/pageflow/pull/660.patch","issue_url":"https://api.github.com/repos/codevise/pageflow/issues/660","number":660,"state":"open","locked":false,"title":"Nested file types, text track files","user":{"login":"aviav","id":7578262,"avatar_url":"https://avatars.githubusercontent.com/u/7578262?v=3","gravatar_id":"","url":"https://api.github.com/users/aviav","html_url":"https://github.com/aviav","followers_url":"https://api.github.com/users/aviav/followers","following_url":"https://api.github.com/users/aviav/following{/other_user}","gists_url":"https://api.github.com/users/aviav/gists{/gist_id}","starred_url":"https://api.github.com/users/aviav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviav/subscriptions","organizations_url":"https://api.github.com/users/aviav/orgs","repos_url":"https://api.github.com/users/aviav/repos","events_url":"https://api.github.com/users/aviav/events{/privacy}","received_events_url":"https://api.github.com/users/aviav/received_events","type":"User","site_admin":false},"body":"Add support for nesting file types in parent file types.\r\n\r\nAs a first example, add text track files as a nested file type with parent video file. Includes menus and CRUD workflows, but not yet the actual display of subtitles etc.","created_at":"2016-10-24T14:16:19Z","updated_at":"2016-10-27T12:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f10e4ed575d941a45fb3ec3398408ce057b46e3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codevise/pageflow/pulls/660/commits","review_comments_url":"https://api.github.com/repos/codevise/pageflow/pulls/660/comments","review_comment_url":"https://api.github.com/repos/codevise/pageflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codevise/pageflow/issues/660/comments","statuses_url":"https://api.github.com/repos/codevise/pageflow/statuses/5ff59e547c3d24cd6c54d682155a4bfa6ab0f27e","head":{"label":"aviav:nested-file-types","ref":"nested-file-types","sha":"5ff59e547c3d24cd6c54d682155a4bfa6ab0f27e","user":{"login":"aviav","id":7578262,"avatar_url":"https://avatars.githubusercontent.com/u/7578262?v=3","gravatar_id":"","url":"https://api.github.com/users/aviav","html_url":"https://github.com/aviav","followers_url":"https://api.github.com/users/aviav/followers","following_url":"https://api.github.com/users/aviav/following{/other_user}","gists_url":"https://api.github.com/users/aviav/gists{/gist_id}","starred_url":"https://api.github.com/users/aviav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviav/subscriptions","organizations_url":"https://api.github.com/users/aviav/orgs","repos_url":"https://api.github.com/users/aviav/repos","events_url":"https://api.github.com/users/aviav/events{/privacy}","received_events_url":"https://api.github.com/users/aviav/received_events","type":"User","site_admin":false},"repo":{"id":53050743,"name":"pageflow","full_name":"aviav/pageflow","owner":{"login":"aviav","id":7578262,"avatar_url":"https://avatars.githubusercontent.com/u/7578262?v=3","gravatar_id":"","url":"https://api.github.com/users/aviav","html_url":"https://github.com/aviav","followers_url":"https://api.github.com/users/aviav/followers","following_url":"https://api.github.com/users/aviav/following{/other_user}","gists_url":"https://api.github.com/users/aviav/gists{/gist_id}","starred_url":"https://api.github.com/users/aviav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviav/subscriptions","organizations_url":"https://api.github.com/users/aviav/orgs","repos_url":"https://api.github.com/users/aviav/repos","events_url":"https://api.github.com/users/aviav/events{/privacy}","received_events_url":"https://api.github.com/users/aviav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aviav/pageflow","description":"Multimedia story telling for the web.","fork":true,"url":"https://api.github.com/repos/aviav/pageflow","forks_url":"https://api.github.com/repos/aviav/pageflow/forks","keys_url":"https://api.github.com/repos/aviav/pageflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aviav/pageflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aviav/pageflow/teams","hooks_url":"https://api.github.com/repos/aviav/pageflow/hooks","issue_events_url":"https://api.github.com/repos/aviav/pageflow/issues/events{/number}","events_url":"https://api.github.com/repos/aviav/pageflow/events","assignees_url":"https://api.github.com/repos/aviav/pageflow/assignees{/user}","branches_url":"https://api.github.com/repos/aviav/pageflow/branches{/branch}","tags_url":"https://api.github.com/repos/aviav/pageflow/tags","blobs_url":"https://api.github.com/repos/aviav/pageflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aviav/pageflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aviav/pageflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/aviav/pageflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aviav/pageflow/statuses/{sha}","languages_url":"https://api.github.com/repos/aviav/pageflow/languages","stargazers_url":"https://api.github.com/repos/aviav/pageflow/stargazers","contributors_url":"https://api.github.com/repos/aviav/pageflow/contributors","subscribers_url":"https://api.github.com/repos/aviav/pageflow/subscribers","subscription_url":"https://api.github.com/repos/aviav/pageflow/subscription","commits_url":"https://api.github.com/repos/aviav/pageflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/aviav/pageflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/aviav/pageflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/aviav/pageflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/aviav/pageflow/contents/{+path}","compare_url":"https://api.github.com/repos/aviav/pageflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aviav/pageflow/merges","archive_url":"https://api.github.com/repos/aviav/pageflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aviav/pageflow/downloads","issues_url":"https://api.github.com/repos/aviav/pageflow/issues{/number}","pulls_url":"https://api.github.com/repos/aviav/pageflow/pulls{/number}","milestones_url":"https://api.github.com/repos/aviav/pageflow/milestones{/number}","notifications_url":"https://api.github.com/repos/aviav/pageflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aviav/pageflow/labels{/name}","releases_url":"https://api.github.com/repos/aviav/pageflow/releases{/id}","deployments_url":"https://api.github.com/repos/aviav/pageflow/deployments","created_at":"2016-03-03T13:04:03Z","updated_at":"2016-03-03T13:04:05Z","pushed_at":"2016-10-27T12:45:19Z","git_url":"git://github.com/aviav/pageflow.git","ssh_url":"git@github.com:aviav/pageflow.git","clone_url":"https://github.com/aviav/pageflow.git","svn_url":"https://github.com/aviav/pageflow","homepage":"http://pageflow.io","size":12051,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codevise:master","ref":"master","sha":"b8ffab00fc3b36a28add001e24fd6dac0d67de3a","user":{"login":"codevise","id":537804,"avatar_url":"https://avatars.githubusercontent.com/u/537804?v=3","gravatar_id":"","url":"https://api.github.com/users/codevise","html_url":"https://github.com/codevise","followers_url":"https://api.github.com/users/codevise/followers","following_url":"https://api.github.com/users/codevise/following{/other_user}","gists_url":"https://api.github.com/users/codevise/gists{/gist_id}","starred_url":"https://api.github.com/users/codevise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codevise/subscriptions","organizations_url":"https://api.github.com/users/codevise/orgs","repos_url":"https://api.github.com/users/codevise/repos","events_url":"https://api.github.com/users/codevise/events{/privacy}","received_events_url":"https://api.github.com/users/codevise/received_events","type":"Organization","site_admin":false},"repo":{"id":19446839,"name":"pageflow","full_name":"codevise/pageflow","owner":{"login":"codevise","id":537804,"avatar_url":"https://avatars.githubusercontent.com/u/537804?v=3","gravatar_id":"","url":"https://api.github.com/users/codevise","html_url":"https://github.com/codevise","followers_url":"https://api.github.com/users/codevise/followers","following_url":"https://api.github.com/users/codevise/following{/other_user}","gists_url":"https://api.github.com/users/codevise/gists{/gist_id}","starred_url":"https://api.github.com/users/codevise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codevise/subscriptions","organizations_url":"https://api.github.com/users/codevise/orgs","repos_url":"https://api.github.com/users/codevise/repos","events_url":"https://api.github.com/users/codevise/events{/privacy}","received_events_url":"https://api.github.com/users/codevise/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codevise/pageflow","description":"Multimedia story telling for the web.","fork":false,"url":"https://api.github.com/repos/codevise/pageflow","forks_url":"https://api.github.com/repos/codevise/pageflow/forks","keys_url":"https://api.github.com/repos/codevise/pageflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codevise/pageflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codevise/pageflow/teams","hooks_url":"https://api.github.com/repos/codevise/pageflow/hooks","issue_events_url":"https://api.github.com/repos/codevise/pageflow/issues/events{/number}","events_url":"https://api.github.com/repos/codevise/pageflow/events","assignees_url":"https://api.github.com/repos/codevise/pageflow/assignees{/user}","branches_url":"https://api.github.com/repos/codevise/pageflow/branches{/branch}","tags_url":"https://api.github.com/repos/codevise/pageflow/tags","blobs_url":"https://api.github.com/repos/codevise/pageflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codevise/pageflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codevise/pageflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/codevise/pageflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codevise/pageflow/statuses/{sha}","languages_url":"https://api.github.com/repos/codevise/pageflow/languages","stargazers_url":"https://api.github.com/repos/codevise/pageflow/stargazers","contributors_url":"https://api.github.com/repos/codevise/pageflow/contributors","subscribers_url":"https://api.github.com/repos/codevise/pageflow/subscribers","subscription_url":"https://api.github.com/repos/codevise/pageflow/subscription","commits_url":"https://api.github.com/repos/codevise/pageflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/codevise/pageflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/codevise/pageflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/codevise/pageflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/codevise/pageflow/contents/{+path}","compare_url":"https://api.github.com/repos/codevise/pageflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codevise/pageflow/merges","archive_url":"https://api.github.com/repos/codevise/pageflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codevise/pageflow/downloads","issues_url":"https://api.github.com/repos/codevise/pageflow/issues{/number}","pulls_url":"https://api.github.com/repos/codevise/pageflow/pulls{/number}","milestones_url":"https://api.github.com/repos/codevise/pageflow/milestones{/number}","notifications_url":"https://api.github.com/repos/codevise/pageflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codevise/pageflow/labels{/name}","releases_url":"https://api.github.com/repos/codevise/pageflow/releases{/id}","deployments_url":"https://api.github.com/repos/codevise/pageflow/deployments","created_at":"2014-05-05T06:50:13Z","updated_at":"2016-10-24T11:25:18Z","pushed_at":"2016-10-27T12:45:20Z","git_url":"git://github.com/codevise/pageflow.git","ssh_url":"git@github.com:codevise/pageflow.git","clone_url":"https://github.com/codevise/pageflow.git","svn_url":"https://github.com/codevise/pageflow","homepage":"http://pageflow.io","size":12346,"stargazers_count":464,"watchers_count":464,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":17,"forks":83,"open_issues":17,"watchers":464,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/660"},"html":{"href":"https://github.com/codevise/pageflow/pull/660"},"issue":{"href":"https://api.github.com/repos/codevise/pageflow/issues/660"},"comments":{"href":"https://api.github.com/repos/codevise/pageflow/issues/660/comments"},"review_comments":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/660/comments"},"review_comment":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codevise/pageflow/pulls/660/commits"},"statuses":{"href":"https://api.github.com/repos/codevise/pageflow/statuses/5ff59e547c3d24cd6c54d682155a4bfa6ab0f27e"}}}}
{"actor":{"display_login":"houndci-bot"}}