summaryrefslogtreecommitdiffstats
path: root/test/functional/issues_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-03-04 14:25:49 +0000
committerGo MAEDA <maeda@farend.jp>2024-03-04 14:25:49 +0000
commitc94d7c5a57516f14d215ebc58324628703daadaf (patch)
tree1d6189318b0c56eeaaf1685f6f33eed2ddf46683 /test/functional/issues_controller_test.rb
parente1ffdb2316f507de4f89067da364a566d667e4e3 (diff)
downloadredmine-c94d7c5a57516f14d215ebc58324628703daadaf.tar.gz
redmine-c94d7c5a57516f14d215ebc58324628703daadaf.zip
Fix Atom feed for issues to correctly use the updated time for "updated" element instead of the created time (#33829).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22764 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r--test/functional/issues_controller_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index cce8ddc62..00661827e 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1246,6 +1246,16 @@ class IssuesControllerTest < Redmine::ControllerTest
assert_select 'link[rel=self][href=?]', 'http://test.host/projects/ecookbook/issues.atom'
assert_select 'link[rel=alternate][href=?]', 'http://test.host/projects/ecookbook/issues'
assert_select 'entry link[href=?]', 'http://test.host/issues/1'
+
+ assert_select 'entry' do |entries|
+ entries.each do |entry|
+ issue_id = entry.at('id').text.split('/').last.to_i
+ issue = Issue.find(issue_id)
+ formatted_updated_on = issue.updated_on.utc.iso8601
+ # <updated> element should use the value of `Issue#updated_on`
+ assert_select entry, 'updated', text: formatted_updated_on
+ end
+ end
end
end