]> source.dussan.org Git - redmine.git/commitdiff
Test for #30949.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Jun 2019 06:29:36 +0000 (06:29 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Jun 2019 06:29:36 +0000 (06:29 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@18266 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/versions_controller_test.rb

index 77648de21e0a254c18ed3ab6e290e642685945bf..358b6f8c0b3ab5e0bdbe815d5d831bc0b21a4d1d 100644 (file)
@@ -187,6 +187,25 @@ class VersionsControllerTest < Redmine::ControllerTest
     end
   end
 
+  def test_show_should_round_down_progress_percentages
+    issue = Issue.find(12)
+    issue.estimated_hours = 40
+    issue.save!
+
+    with_settings :default_language => 'en' do
+      get :show, :params => {:id => 2}
+      assert_response :success
+
+      assert_select 'div.version-overview' do
+        assert_select 'table.progress-98' do
+          assert_select 'td[class=closed][title=?]', 'closed: 98%'
+          assert_select 'td[class=done][title=?]', '% Done: 99%'
+        end
+        assert_select 'p[class=percent]', :text => '99%'
+      end
+    end
+  end
+
   def test_new
     @request.session[:user_id] = 2
     get :new, :params => {:project_id => '1'}