summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-09-27 19:55:09 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-09-27 19:55:09 +0000
commit20baf029ba62bf21be10b96a1cbc13364912853f (patch)
tree2adf4be3b2973d1e62d88b01374257bcd38362e8 /test/functional/users_controller_test.rb
parent1678f0d57af2339b6399c5971ca42822ef6d5888 (diff)
downloadredmine-20baf029ba62bf21be10b96a1cbc13364912853f.tar.gz
redmine-20baf029ba62bf21be10b96a1cbc13364912853f.zip
Fix undefined method when auth source name column is added as column (#37674).
git-svn-id: https://svn.redmine.org/redmine/trunk@21861 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index c17737fe1..52d604ee8 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -175,6 +175,20 @@ class UsersControllerTest < Redmine::ControllerTest
end
end
+ def test_index_with_auth_source_column
+ user = User.find(1)
+ user.update_column :auth_source_id, 1
+
+ get :index, params: {
+ set_filter: 1,
+ f: ['auth_source_id'], op: {auth_source_id: '='}, v: {auth_source_id: ['1']},
+ c: %w(login firstname lastname mail auth_source.name)
+ }
+ assert_response :success
+
+ assert_select 'tr#user-1', 1
+ end
+
def test_index_csv
with_settings :default_language => 'en' do
user = User.logged.status(1).first