rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
unless @issue.disabled_core_fields.include?('assigned_to_id')
- rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
+ rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_principal(@issue.assigned_to) : "-"), :class => 'assigned-to'
end
unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
assert_select 'table.attributes .category', 0
end
- def test_show_should_display_link_to_the_assignee
+ def test_show_should_display_link_to_the_assigned_user
get(:show, :params => {:id => 2})
assert_response :success
assert_select '.assigned-to' do
end
end
+ def test_show_should_display_link_to_the_assigned_group
+ Issue.find(2).update_attribute(:assigned_to_id, 10)
+ get(:show, :params => {:id => 2})
+ assert_response :success
+ assert_select '.assigned-to' do
+ assert_select 'a[href="/groups/10"]'
+ end
+ end
+
def test_show_should_display_visible_changesets_from_other_projects
project = Project.find(2)
issue = project.issues.first