diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-31 13:33:27 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-31 13:33:27 +0000 |
commit | 72e2efdc6070bc4aef66042b471a5b20c8daa43b (patch) | |
tree | a3d86d9cbf5b65e114858f9c9315ae4ce815281a /test/unit | |
parent | 6ee209843ed0720a861173680bc888a10f305b2e (diff) | |
download | redmine-72e2efdc6070bc4aef66042b471a5b20c8daa43b.tar.gz redmine-72e2efdc6070bc4aef66042b471a5b20c8daa43b.zip |
Default query should not be applied if the query is not allowed to be set as the default (#37499).
Patch by Mizuki ISHIKAWA.
git-svn-id: https://svn.redmine.org/redmine/trunk@21748 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/project_query_test.rb | 1 | ||||
-rw-r--r-- | test/unit/query_test.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/project_query_test.rb b/test/unit/project_query_test.rb index 0471c1df8..21ef90983 100644 --- a/test/unit/project_query_test.rb +++ b/test/unit/project_query_test.rb @@ -87,6 +87,7 @@ class ProjectQueryTest < ActiveSupport::TestCase user = User.find(1) query = ProjectQuery.find(11) user_query = ProjectQuery.find(12) + user_query.update(visibility: Query::VISIBILITY_PUBLIC) [nil, user, User.anonymous].each do |u| assert_nil IssueQuery.default(user: u) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index bb097f88a..4d6650ee8 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -2814,6 +2814,7 @@ class QueryTest < ActiveSupport::TestCase project_query = IssueQuery.find(1) query = IssueQuery.find(4) user_query = IssueQuery.find(3) + user_query.update(visibility: Query::VISIBILITY_PUBLIC) user_query.update_column :user_id, user.id [nil, user, User.anonymous].each do |u| |