0001-ThemesTest-fails-if-a-third-party-theme-with-a-favic.patch

Go MAEDA, 2019-08-25 04:27

Download (1.63 KB)

View differences:

test/integration/lib/redmine/themes_test.rb
59 59
  end
60 60

  
61 61
  def test_use_default_favicon_if_theme_provides_none
62
    @theme.favicons.clear
62 63
    get '/'
63 64

  
64 65
    assert_response :success
......
67 68

  
68 69
  def test_use_theme_favicon_if_theme_provides_one
69 70
    # Simulate a theme favicon
70
    @theme.favicons << 'a.ico'
71
    @theme.favicons.unshift('a.ico')
71 72
    get '/'
72 73

  
73 74
    assert_response :success
......
77 78
  end
78 79

  
79 80
  def test_use_only_one_theme_favicon_if_theme_provides_many
80
    @theme.favicons.concat %w{b.ico a.png}
81
    @theme.favicons.unshift('b.ico', 'a.png')
81 82
    get '/'
82 83

  
83 84
    assert_response :success
......
90 91

  
91 92
  def test_with_sub_uri
92 93
    Redmine::Utils.relative_url_root = '/foo'
93
    @theme.javascripts << 'theme'
94
    @theme.favicons << 'a.ico'
94
    @theme.javascripts.unshift('theme')
95
    @theme.favicons.unshift('a.ico')
95 96
    get '/'
96 97

  
97 98
    assert_response :success
98
-