fix tests

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2013-12-26 09:39:55 +02:00
parent 21b028b548
commit d4ec23b8b5
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
2 changed files with 4 additions and 2 deletions

View File

@ -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>"

View File

@ -108,7 +108,7 @@ describe "On a merge request", js: true do
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