@@ -1,5 +1,5 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -37,7 +37,7 class RepositoriesSubversionControllerTest < ActionController::TestCase | |||||
37 |
|
37 | |||
38 | @project = Project.find(PRJ_ID) |
|
38 | @project = Project.find(PRJ_ID) | |
39 | @repository = Repository::Subversion.create(:project => @project, |
|
39 | @repository = Repository::Subversion.create(:project => @project, | |
40 |
:url => |
|
40 | :url => self.class.subversion_repository_url) | |
41 | assert @repository |
|
41 | assert @repository | |
42 | end |
|
42 | end | |
43 |
|
43 |
@@ -1,5 +1,5 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -109,6 +109,13 class ActiveSupport::TestCase | |||||
109 | File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository") |
|
109 | File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository") | |
110 | end |
|
110 | end | |
111 |
|
111 | |||
|
112 | # Returns the url of the subbversion test repository | |||
|
113 | def self.subversion_repository_url | |||
|
114 | path = repository_path('subversion') | |||
|
115 | path = '/' + path unless path.starts_with?('/') | |||
|
116 | "file://#{path}" | |||
|
117 | end | |||
|
118 | ||||
112 | # Returns true if the +vendor+ test repository is configured |
|
119 | # Returns true if the +vendor+ test repository is configured | |
113 | def self.repository_configured?(vendor) |
|
120 | def self.repository_configured?(vendor) | |
114 | File.directory?(repository_path(vendor)) |
|
121 | File.directory?(repository_path(vendor)) |
@@ -1,5 +1,5 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -24,8 +24,7 begin | |||||
24 |
|
24 | |||
25 | if repository_configured?('subversion') |
|
25 | if repository_configured?('subversion') | |
26 | def setup |
|
26 | def setup | |
27 | repo_path = "file://#{self.class.repository_path('subversion')}" |
|
27 | @adapter = Redmine::Scm::Adapters::SubversionAdapter.new(self.class.subversion_repository_url) | |
28 | @adapter = Redmine::Scm::Adapters::SubversionAdapter.new(repo_path) |
|
|||
29 | end |
|
28 | end | |
30 |
|
29 | |||
31 | def test_client_version |
|
30 | def test_client_version |
@@ -1,5 +1,5 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -23,7 +23,7 class RepositorySubversionTest < ActiveSupport::TestCase | |||||
23 | def setup |
|
23 | def setup | |
24 | @project = Project.find(3) |
|
24 | @project = Project.find(3) | |
25 | @repository = Repository::Subversion.create(:project => @project, |
|
25 | @repository = Repository::Subversion.create(:project => @project, | |
26 |
:url => |
|
26 | :url => self.class.subversion_repository_url) | |
27 | assert @repository |
|
27 | assert @repository | |
28 | end |
|
28 | end | |
29 |
|
29 |
General Comments 0
You need to be logged in to leave comments.
Login now