mirror of
https://github.com/redmine/redmine.git
synced 2026-02-10 00:27:40 +01:00
Merged r18005 from trunk to 3.4-stable (#30923).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@18007 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1002,4 +1002,35 @@ class ProjectsControllerTest < Redmine::ControllerTest
|
||||
}
|
||||
assert_select 'body.project-ecookbook'
|
||||
end
|
||||
|
||||
def test_default_search_scope_in_global_page
|
||||
get :index
|
||||
|
||||
assert_select 'div#quick-search form' do
|
||||
assert_select 'input[name=scope][type=hidden]'
|
||||
assert_select 'a[href=?]', '/search'
|
||||
end
|
||||
end
|
||||
|
||||
def test_default_search_scope_for_project_without_subprojects
|
||||
get :show, :params => {
|
||||
:id => 4,
|
||||
}
|
||||
|
||||
assert_select 'div#quick-search form' do
|
||||
assert_select 'input[name=scope][type=hidden]'
|
||||
assert_select 'a[href=?]', '/projects/subproject2/search'
|
||||
end
|
||||
end
|
||||
|
||||
def test_default_search_scope_for_project_with_subprojects
|
||||
get :show, :params => {
|
||||
:id => 1,
|
||||
}
|
||||
|
||||
assert_select 'div#quick-search form' do
|
||||
assert_select 'input[name=scope][type=hidden][value=subprojects]'
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/search?scope=subprojects'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user