From 3146df984909f016a3e744e25e3d91c4d9ec7063 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Fri, 14 Jul 2017 20:06:30 +0200 Subject: [PATCH] Add test assertions showcasing the issue. --- test/unit/helpers/application_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 020b463..9c85e59 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -282,6 +282,9 @@ RAW 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'}, @@ -390,6 +393,13 @@ RAW '@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 "

#{result}

", textilizable(text), "#{text} failed" } -- 1.9.1