@@ -33,27 +33,27 class RepositoryGitTest < ActiveSupport::TestCase | |||||
33 | # WINDOWS_PASS = Redmine::Platform.mswin? |
|
33 | # WINDOWS_PASS = Redmine::Platform.mswin? | |
34 | WINDOWS_PASS = false |
|
34 | WINDOWS_PASS = false | |
35 |
|
35 | |||
36 | def setup |
|
|||
37 | klass = Repository::Git |
|
|||
38 | assert_equal "Git", klass.scm_name |
|
|||
39 | assert klass.scm_adapter_class |
|
|||
40 | assert_not_equal "", klass.scm_command |
|
|||
41 | assert_equal true, klass.scm_available |
|
|||
42 |
|
||||
43 | @project = Project.find(3) |
|
|||
44 | @repository = Repository::Git.create( |
|
|||
45 | :project => @project, |
|
|||
46 | :url => REPOSITORY_PATH, |
|
|||
47 | :path_encoding => 'ISO-8859-1' |
|
|||
48 | ) |
|
|||
49 | assert @repository |
|
|||
50 | @char_1 = CHAR_1_HEX.dup |
|
|||
51 | if @char_1.respond_to?(:force_encoding) |
|
|||
52 | @char_1.force_encoding('UTF-8') |
|
|||
53 | end |
|
|||
54 | end |
|
|||
55 |
|
||||
56 | if File.directory?(REPOSITORY_PATH) |
|
36 | if File.directory?(REPOSITORY_PATH) | |
|
37 | def setup | |||
|
38 | klass = Repository::Git | |||
|
39 | assert_equal "Git", klass.scm_name | |||
|
40 | assert klass.scm_adapter_class | |||
|
41 | assert_not_equal "", klass.scm_command | |||
|
42 | assert_equal true, klass.scm_available | |||
|
43 | ||||
|
44 | @project = Project.find(3) | |||
|
45 | @repository = Repository::Git.create( | |||
|
46 | :project => @project, | |||
|
47 | :url => REPOSITORY_PATH, | |||
|
48 | :path_encoding => 'ISO-8859-1' | |||
|
49 | ) | |||
|
50 | assert @repository | |||
|
51 | @char_1 = CHAR_1_HEX.dup | |||
|
52 | if @char_1.respond_to?(:force_encoding) | |||
|
53 | @char_1.force_encoding('UTF-8') | |||
|
54 | end | |||
|
55 | end | |||
|
56 | ||||
57 | def test_fetch_changesets_from_scratch |
|
57 | def test_fetch_changesets_from_scratch | |
58 | @repository.fetch_changesets |
|
58 | @repository.fetch_changesets | |
59 | @repository.reload |
|
59 | @repository.reload |
General Comments 0
You need to be logged in to leave comments.
Login now