Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2006-2019 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -17,7 +19,7 @@
require File.expand_path('../../test_helper', __FILE__)
class RepositoriesBazaarControllerTest < Redmine::ControllerTest
class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
tests RepositoriesController
fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
@ -26,9 +28,9 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository').to_s
REPOSITORY_PATH_TRUNK = File.join(REPOSITORY_PATH, "trunk")
PRJ_ID = 3
CHAR_1_UTF8_HEX = "\xc3\x9c".dup.force_encoding('UTF-8')
def setup
super
User.current = nil
@project = Project.find(PRJ_ID)
@repository = Repository::Bazaar.create(
@ -67,6 +69,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_browse_directory
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory'])[:param]
}
assert_response :success
@ -81,6 +84,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_browse_at_given_revision
get :show, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash([])[:param],
:rev => 3
}
@ -97,6 +101,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_changes
get :changes, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['doc-mkdir.txt'])[:param]
}
assert_response :success
@ -106,6 +111,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_entry_show
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory', 'doc-ls.txt'])[:param]
}
assert_response :success
@ -116,6 +122,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_entry_download
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory', 'doc-ls.txt'])[:param],
:format => 'raw'
}
@ -127,6 +134,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_directory_entry
get :entry, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['directory'])[:param]
}
assert_response :success
@ -138,6 +146,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
['inline', 'sbs'].each do |dt|
get :diff, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:rev => 3,
:type => dt
}
@ -150,6 +159,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
def test_annotate
get :annotate, :params => {
:id => PRJ_ID,
:repository_id => @repository.id,
:path => repository_path_hash(['doc-mkdir.txt'])[:param]
}
assert_response :success
@ -213,7 +223,7 @@ class RepositoriesBazaarControllerTest < Redmine::ControllerTest
assert_select "th.line-num", :text => '1' do
assert_select "+ td.revision" do
assert_select "a", :text => '2'
assert_select "+ td.author", :text => "test #{CHAR_1_UTF8_HEX}" do
assert_select "+ td.author", :text => "test Ü" do
assert_select "+ td",
:text => "author non ASCII test"
end