1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-04 22:59:47 +00:00

Test for r17421 (#26091).

Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@17424 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2018-06-29 07:11:56 +00:00
parent 2149e1bfbe
commit 46671966c9

View File

@ -605,7 +605,10 @@ class QueriesControllerTest < Redmine::ControllerTest
assert_include ["eCookbook - 2.0", "3", "open"], json
end
def test_filter_without_project_id_should_return_filter_values
def test_filter_without_project_id_should_return_all_visible_fixed_versions
# Remove "jsmith" user from "Private child of eCookbook" project
Project.find(5).memberships.find_by(:user_id => 2).destroy
@request.session[:user_id] = 2
get :filter, :params => {
:name => 'fixed_version_id'
@ -614,7 +617,15 @@ class QueriesControllerTest < Redmine::ControllerTest
assert_response :success
assert_equal 'application/json', response.content_type
json = ActiveSupport::JSON.decode(response.body)
# response includes visible version
assert_include ["eCookbook Subproject 1 - 2.0", "4", "open"], json
assert_include ["eCookbook - 0.1", "1", "closed"], json
# response includes systemwide visible version
assert_include ["OnlineStore - Systemwide visible version", "7", "open"], json
# response doesn't include non visible version
refute_includes ["Private child of eCookbook - Private Version of public subproject", "6", "open"], json
end
def test_subproject_filter_time_entries_with_project_id_should_return_filter_values