diff --git a/db/migrate/20100705164950_change_changes_path_length_limit.rb b/db/migrate/20100705164950_change_changes_path_length_limit.rb new file mode 100644 index 000000000..5f34d5dcf --- /dev/null +++ b/db/migrate/20100705164950_change_changes_path_length_limit.rb @@ -0,0 +1,11 @@ +class ChangeChangesPathLengthLimit < ActiveRecord::Migration + def self.up + change_column :changes, :path, :text, :default => "", :null => false + change_column :changes, :from_path, :text + end + + def self.down + change_column :changes, :path, :string, :default => "", :null => false + change_column :changes, :from_path, :string + end +end diff --git a/test/fixtures/repositories/git_repository.tar.gz b/test/fixtures/repositories/git_repository.tar.gz index 48966da30..8158d5832 100644 Binary files a/test/fixtures/repositories/git_repository.tar.gz and b/test/fixtures/repositories/git_repository.tar.gz differ diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index 37c6fb848..317261a13 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -50,8 +50,9 @@ class RepositoriesGitControllerTest < ActionController::TestCase assert_response :success assert_template 'show' assert_not_nil assigns(:entries) - assert_equal 6, assigns(:entries).size + assert_equal 7, assigns(:entries).size assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'} + assert assigns(:entries).detect {|e| e.name == 'this_is_a_really_long_and_verbose_directory_name' && e.kind == 'dir'} assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'} assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'} assert assigns(:entries).detect {|e| e.name == 'copied_README' && e.kind == 'file'} diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index e3c633749..2dc5d3e8e 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -13,7 +13,7 @@ class GitAdapterTest < ActiveSupport::TestCase end def test_getting_all_revisions - assert_equal 12, @adapter.revisions('',nil,nil,:all => true).length + assert_equal 13, @adapter.revisions('',nil,nil,:all => true).length end def test_annotate diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 71b3e4da5..dad5610ae 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -34,8 +34,8 @@ class RepositoryGitTest < ActiveSupport::TestCase @repository.fetch_changesets @repository.reload - assert_equal 12, @repository.changesets.count - assert_equal 21, @repository.changes.count + assert_equal 13, @repository.changesets.count + assert_equal 22, @repository.changes.count commit = @repository.changesets.find(:first, :order => 'committed_on ASC') assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments @@ -57,10 +57,10 @@ class RepositoryGitTest < ActiveSupport::TestCase # Remove the 3 latest changesets @repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy) @repository.reload - assert_equal 9, @repository.changesets.count + assert_equal 10, @repository.changesets.count @repository.fetch_changesets - assert_equal 12, @repository.changesets.count + assert_equal 13, @repository.changesets.count end else puts "Git test repository NOT FOUND. Skipping unit tests !!!"