Project

General

Profile

Patch #25775 » 25775-test.patch

Patch for test (issue controller and UI) - Akiko Takano, 2017-05-08 01:17

View differences:

test/functional/issues_controller_test.rb Tue Apr 25 17:44:08 2017 +0000 → test/functional/issues_controller_test.rb Mon May 08 08:13:17 2017 +0900
4987 4987
    assert_response :success
4988 4988
    assert_select 'a[href=?][onclick=?]', "/issues/1", "", :text => 'Cancel'
4989 4989
  end
4990

  
4991
  def test_show_should_display_with_assignees_gravatars
4992
    @request.session[:user_id] = 1
4993
    issue = Issue.find(1)
4994

  
4995
    with_settings :gravatar_enabled => '1' do
4996
      get :show, :id => issue.id
4997
      assert_equal issue.assigned_to_id, nil
4998
      assert_select 'div.gravatar-with-child' do
4999
        assert_select 'img', 1
5000
      end
5001

  
5002
      issue.update :assigned_to_id => User.find(2).id
5003
      get :show, :id => issue.id
5004
      assert_equal issue.assigned_to_id, 2
5005
    end
5006

  
5007
    assert_select 'div.gravatar-with-child' do
5008
      assert_select 'img', 2
5009
      assert_select 'img.gravatar', 1
5010
      assert_select 'img.gravatar-child', 1
5011
    end
5012
  end
4990 5013
end
(3-3/5)