mirror of
https://github.com/redmine/redmine.git
synced 2026-03-18 02:20:59 +01:00
Adds (a maximum of 3) links to project ancestors in the page title (#2788).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2485 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -447,6 +447,22 @@ class ProjectsControllerTest < Test::Unit::TestCase
|
||||
assert Project.find(1).active?
|
||||
end
|
||||
|
||||
def test_project_breadcrumbs_should_be_limited_to_3_ancestors
|
||||
CustomField.delete_all
|
||||
parent = nil
|
||||
6.times do |i|
|
||||
p = Project.create!(:name => "Breadcrumbs #{i}", :identifier => "breadcrumbs-#{i}")
|
||||
p.set_parent!(parent)
|
||||
|
||||
get :show, :id => p
|
||||
assert_tag :h1, :parent => { :attributes => {:id => 'header'}},
|
||||
:children => { :count => [i, 3].min,
|
||||
:only => { :tag => 'a' } }
|
||||
|
||||
parent = p
|
||||
end
|
||||
end
|
||||
|
||||
def test_jump_should_redirect_to_active_tab
|
||||
get :show, :id => 1, :jump => 'issues'
|
||||
assert_redirected_to 'projects/ecookbook/issues'
|
||||
|
||||
Reference in New Issue
Block a user