Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
  • Loading branch information
dzaporozhets committed Dec 26, 2013
1 parent 21b028b commit d4ec23b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/assets/javascripts/notes.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ class Notes

# does it already have notes?
if nextRow.is(".notes_holder")
$.proxy(@replyToDiscussionNote, nextRow.find(".js-discussion-reply-button")).call()
replyButton = nextRow.find(".js-discussion-reply-button")
if replyButton.length > 0
$.proxy(@replyToDiscussionNote, replyButton).call()
else
# add a notes row and insert the form
row.after "<tr class=\"notes_holder js-temp-notes-holder\"><td class=\"notes_line\" colspan=\"2\"></td><td class=\"notes_content\"></td></tr>"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/notes_on_merge_requests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

within("#note_#{note.id}") do
should have_css(".note-last-update small")
find(".note-last-update small").text.should match(/Edited just now/)
find(".note-last-update small").text.should match(/Edited less than a minute ago/)
end
end
end
Expand Down

0 comments on commit d4ec23b

Please sign in to comment.