@@ -115,7 +115,7 class QueryTest < ActiveSupport::TestCase | |||
|
115 | 115 | def assert_query_statement_includes(query, condition) |
|
116 | 116 | assert_include condition, query.statement |
|
117 | 117 | end |
|
118 | ||
|
118 | ||
|
119 | 119 | def assert_query_result(expected, query) |
|
120 | 120 | assert_nothing_raised do |
|
121 | 121 | assert_equal expected.map(&:id).sort, query.issues.map(&:id).sort |
@@ -942,7 +942,7 class QueryTest < ActiveSupport::TestCase | |||
|
942 | 942 | assert_nil q.group_by_column |
|
943 | 943 | assert_nil q.group_by_statement |
|
944 | 944 | end |
|
945 | ||
|
945 | ||
|
946 | 946 | def test_sortable_columns_should_sort_assignees_according_to_user_format_setting |
|
947 | 947 | with_settings :user_format => 'lastname_coma_firstname' do |
|
948 | 948 | q = IssueQuery.new |
@@ -950,7 +950,7 class QueryTest < ActiveSupport::TestCase | |||
|
950 | 950 | assert_equal %w(users.lastname users.firstname users.id), q.sortable_columns['assigned_to'] |
|
951 | 951 | end |
|
952 | 952 | end |
|
953 | ||
|
953 | ||
|
954 | 954 | def test_sortable_columns_should_sort_authors_according_to_user_format_setting |
|
955 | 955 | with_settings :user_format => 'lastname_coma_firstname' do |
|
956 | 956 | q = IssueQuery.new |
@@ -1340,7 +1340,7 class QueryTest < ActiveSupport::TestCase | |||
|
1340 | 1340 | User.add_to_project(@manager, @project, @manager_role) |
|
1341 | 1341 | User.add_to_project(@developer, @project, @developer_role) |
|
1342 | 1342 | User.add_to_project(@boss, @project, [@manager_role, @developer_role]) |
|
1343 | ||
|
1343 | ||
|
1344 | 1344 | @issue1 = Issue.generate!(:project => @project, :assigned_to_id => @manager.id) |
|
1345 | 1345 | @issue2 = Issue.generate!(:project => @project, :assigned_to_id => @developer.id) |
|
1346 | 1346 | @issue3 = Issue.generate!(:project => @project, :assigned_to_id => @boss.id) |
@@ -1358,7 +1358,7 class QueryTest < ActiveSupport::TestCase | |||
|
1358 | 1358 | should "search assigned to for users with the Role on the issue project" do |
|
1359 | 1359 | other_project = Project.generate! |
|
1360 | 1360 | User.add_to_project(@developer, other_project, @manager_role) |
|
1361 | ||
|
1361 | ||
|
1362 | 1362 | @query = IssueQuery.new(:name => '_', :project => @project) |
|
1363 | 1363 | @query.add_filter('assigned_to_role', '=', [@manager_role.id.to_s]) |
|
1364 | 1364 |
General Comments 0
You need to be logged in to leave comments.
Login now