Skip to content

Commit

Permalink
Improve formatting and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahraqueld committed Jan 22, 2018
1 parent 7de6def commit 7a95def
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/components/story/StoryAttachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class StoryAttachment extends React.Component {

componentDidMount() {
const $filesInput = $(this.filesInput);

$filesInput.off('fileuploadprogressall');
$filesInput.on('fileuploadprogressall', (function(_this, _progressElementId, _finishedElementId) {
return function(e, data) {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/story_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,10 @@ module.exports = FormView.extend({

renderReactComponents: function() {
this.renderControls();
this.renderHistoryLocationContainer();
this.renderDescription();
this.renderTagsInput();
this.renderAttachments();
this.renderHistoryLocationContainer();
this.renderSelects();
this.renderTasks();
this.renderNotes();
Expand Down
5 changes: 1 addition & 4 deletions spec/javascripts/views/story_view_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('StoryView', function() {
this.story.set({editing: true});
this.view.clickSave(this.e);
expect(this.story.get('editing')).toBeTruthy();
expect(requestsToStory(this.server).length).toEqual(1);
expect(this.server.requests.length).toEqual(1);

// editing should be set to false when save is successful
this.server.respond();
Expand Down Expand Up @@ -854,6 +854,3 @@ describe('StoryView', function() {
});
});

const requestsToStory = (server) => (
server.requests.filter(({ url }) => url == '/path/to/story')
);

0 comments on commit 7a95def

Please sign in to comment.