##// END OF EJS Templates
Fixed: Error deleting issue with grandchild (#8880)....
Fixed: Error deleting issue with grandchild (#8880). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6311 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r5934:407761985e5a
r6191:9957883c4ddf
Show More
repository_filesystem_test.rb
55 lines | 1.9 KiB | text/x-ruby | RubyLexer
/ test / unit / repository_filesystem_test.rb
Toshi MARUYAMA
scm: filesystem: remove trailing white-spaces from unit model test....
r5583 # Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Toshi MARUYAMA
scm: filesystem: remove trailing white-spaces from unit model test....
r5583 #
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
Toshi MARUYAMA
scm: filesystem: remove trailing white-spaces from unit model test....
r5583 #
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../test_helper', __FILE__)
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494
Eric Davis
Upgraded to Rails 2.3.4 (#3597)...
r2773 class RepositoryFilesystemTest < ActiveSupport::TestCase
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 fixtures :projects
Toshi MARUYAMA
scm: filesystem: code clean up unit model test....
r5072
Toshi MARUYAMA
scm: filesystem: replace RAILS_ROOT to Rails.root in unit model test....
r5934 REPOSITORY_PATH = Rails.root.join('tmp/test/filesystem_repository').to_s
Toshi MARUYAMA
scm: filesystem: code clean up unit model test....
r5072
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 def setup
Toshi MARUYAMA
scm: filesystem: change project id of unit model test from 1 to 3....
r5073 @project = Project.find(3)
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 Setting.enabled_scm << 'Filesystem' unless Setting.enabled_scm.include?('Filesystem')
Toshi MARUYAMA
scm: filesystem: code clean up unit model test....
r5742 @repository = Repository::Filesystem.create(
:project => @project,
:url => REPOSITORY_PATH
)
assert @repository
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 end
Toshi MARUYAMA
scm: filesystem: code clean up unit model test....
r5072
Toshi MARUYAMA
scm: filesystem: remove trailing white-spaces from unit model test....
r5583 if File.directory?(REPOSITORY_PATH)
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 def test_fetch_changesets
@repository.fetch_changesets
@repository.reload
assert_equal 0, @repository.changesets.count
assert_equal 0, @repository.changes.count
end
Toshi MARUYAMA
scm: filesystem: code clean up unit model test....
r5072
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 def test_entries
Toshi MARUYAMA
scm: filesystem: update test repository for non ascii text files displaying (#6256)....
r5083 assert_equal 3, @repository.entries("", 2).size
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 assert_equal 2, @repository.entries("dir", 3).size
end
def test_cat
assert_equal "TEST CAT\n", @repository.scm.cat("test")
end
else
puts "Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS."
def test_fake; assert true end
end
end