Defect #26443 » 0001-Add-test-assertions-showcasing-the-issue.patch
| test/unit/helpers/application_helper_test.rb | ||
|---|---|---|
|
end
|
||
|
def test_redmine_links
|
||
|
user_with_email_login = User.generate!(:login => 'abcd@example.com')
|
||
|
u_wel_id = user_with_email_login.id
|
||
|
issue_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3},
|
||
|
:class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)')
|
||
|
note_link = link_to('#3-14', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'},
|
||
| ... | ... | |
|
'@jsmith' => link_to_user(User.find_by_id(2)),
|
||
|
# invalid user
|
||
|
'user:foobar' => 'user:foobar',
|
||
|
#user with email as login
|
||
|
"user##{u_wel_id}" => link_to_user(User.find_by_id(u_wel_id)),
|
||
|
# The following two (commented-out) assertions fail...
|
||
|
#'user:abcd@example.com' => link_to_user(User.find_by_id(u_wel_id)),
|
||
|
#'user:"abcd@example.com"' => link_to_user(User.find_by_id(u_wel_id)),
|
||
|
# The following works though
|
||
|
'@abcd@example.com' => link_to_user(User.find_by_id(u_wel_id)),
|
||
|
}
|
||
|
@project = Project.find(1)
|
||
|
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text), "#{text} failed" }
|
||