]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for #29918.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 29 Nov 2018 15:57:04 +0000 (15:57 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 29 Nov 2018 15:57:04 +0000 (15:57 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@17657 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/issues_controller_test.rb

index 901907347c9663419267dbb00d5421e2b5935a01..92440f57360e2292a8e00e67d0bc27e38650e819 100644 (file)
@@ -1796,6 +1796,21 @@ class IssuesControllerTest < Redmine::ControllerTest
     assert_response :success
   end
 
+  def test_show_should_format_related_issues_dates
+    with_settings :date_format => '%d/%m/%Y' do
+      issue = Issue.generate!(:start_date => '2018-11-29', :due_date => '2018-12-01')
+      IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => issue, :relation_type => 'relates')
+  
+      get :show, :params => {
+          :id => 1
+        }
+      assert_response :success
+  
+      assert_select '#relations td.start_date', :text => '29/11/2018'
+      assert_select '#relations td.due_date', :text => '01/12/2018'
+    end
+  end
+
   def test_show_should_not_disclose_relations_to_invisible_issues
     Setting.cross_project_issue_relations = '1'
     IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => Issue.find(2), :relation_type => 'relates')