]> source.dussan.org Git - redmine.git/commitdiff
VersionsControllerTest#test_show randomly fails (#31964, #28510).
authorGo MAEDA <maeda@farend.jp>
Wed, 28 Aug 2019 04:17:09 +0000 (04:17 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 28 Aug 2019 04:17:09 +0000 (04:17 +0000)
Patch by Yuichi HARADA.

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

test/functional/versions_controller_test.rb

index 358b6f8c0b3ab5e0bdbe815d5d831bc0b21a4d1d..8981c69321b2842e09fd20410ad2e0f36ab6e269 100644 (file)
@@ -115,14 +115,16 @@ class VersionsControllerTest < Redmine::ControllerTest
   end
 
   def test_show
-    get :show, :params => {:id => 2}
-    assert_response :success
+    with_settings :gravatar_enabled => '0' do
+      get :show, :params => {:id => 2}
+      assert_response :success
 
-    assert_select 'h2', :text => /1.0/
-    assert_select 'span[class=?]', 'badge badge-status-locked', :text => 'locked'
+      assert_select 'h2', :text => /1.0/
+      assert_select 'span[class=?]', 'badge badge-status-locked', :text => 'locked'
 
-    # no issue avatar when gravatar is disabled
-    assert_select 'img.gravatar', :count => 0
+      # no issue avatar when gravatar is disabled
+      assert_select 'img.gravatar', :count => 0
+    end
   end
 
   def test_show_should_show_issue_assignee