summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 15:16:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-28 15:16:14 +0000
commit76e48c391454ee09628059b3a3675a1db7319988 (patch)
tree6ca274a434ed081865c0684eac191aefe525f1ab /test/functional/timelog_controller_test.rb
parent474453d2b0afc51fd87a03cb110db53f57ab1899 (diff)
downloadredmine-76e48c391454ee09628059b3a3675a1db7319988.tar.gz
redmine-76e48c391454ee09628059b3a3675a1db7319988.zip
Spent time details and report should ignore 'Setting.display_subprojects_issues?' (#14415).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12057 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_controller_test.rb')
-rw-r--r--test/functional/timelog_controller_test.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index 9d07d3e21..6ea3a20b8 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -451,6 +451,28 @@ class TimelogControllerTest < ActionController::TestCase
:attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
end
+ def test_index_with_display_subprojects_issues_to_false_should_not_include_subproject_entries
+ entry = TimeEntry.generate!(:project => Project.find(3))
+
+ with_settings :display_subprojects_issues => '0' do
+ get :index, :project_id => 'ecookbook'
+ assert_response :success
+ assert_template 'index'
+ assert_not_include entry, assigns(:entries)
+ end
+ end
+
+ def test_index_with_display_subprojects_issues_to_false_and_subproject_filter_should_include_subproject_entries
+ entry = TimeEntry.generate!(:project => Project.find(3))
+
+ with_settings :display_subprojects_issues => '0' do
+ get :index, :project_id => 'ecookbook', :subproject_id => 3
+ assert_response :success
+ assert_template 'index'
+ assert_include entry, assigns(:entries)
+ end
+ end
+
def test_index_at_project_level_with_date_range
get :index, :project_id => 'ecookbook',
:f => ['spent_on'],