summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-05-02 03:03:00 +0000
committerGo MAEDA <maeda@farend.jp>2020-05-02 03:03:00 +0000
commit835b53388944c503838d0627d8d8b96a5451272d (patch)
tree859484100b243380958c81d7de9dd9d01f8e1984 /test/functional/users_controller_test.rb
parentfcb6b44f4fdd820189a0cdd31501a150125cdf9f (diff)
downloadredmine-835b53388944c503838d0627d8d8b96a5451272d.tar.gz
redmine-835b53388944c503838d0627d8d8b96a5451272d.zip
Include updated_on and passwd_changed_on columns when exporting users to CSV (#33347).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19740 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 7be370de2..35a1e82d7 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -68,12 +68,16 @@ class UsersControllerTest < Redmine::ControllerTest
def test_index_csv
with_settings :default_language => 'en' do
+ user = User.logged.status(1).first
+ user.update(passwd_changed_on: Time.current.last_month)
get :index, :params => { :format => 'csv' }
assert_response :success
assert_equal User.logged.status(1).count, response.body.chomp.split("\n").size - 1
assert_include 'active', response.body
assert_not_include 'locked', response.body
+ assert_include format_time(user.updated_on), response.body
+ assert_include format_time(user.passwd_changed_on), response.body
assert_equal 'text/csv', @response.media_type
end
end