@@ -24,8 +24,9 class RepositoryDarcsTest < ActiveSupport::TestCase | |||||
24 | REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository' |
|
24 | REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/darcs_repository' | |
25 |
|
25 | |||
26 | def setup |
|
26 | def setup | |
27 |
@project = Project.find( |
|
27 | @project = Project.find(3) | |
28 |
|
|
28 | @repository = Repository::Darcs.create(:project => @project, :url => REPOSITORY_PATH) | |
|
29 | assert @repository | |||
29 | end |
|
30 | end | |
30 |
|
31 | |||
31 | if File.directory?(REPOSITORY_PATH) |
|
32 | if File.directory?(REPOSITORY_PATH) | |
@@ -50,6 +51,8 class RepositoryDarcsTest < ActiveSupport::TestCase | |||||
50 | end |
|
51 | end | |
51 |
|
52 | |||
52 | def test_deleted_files_should_not_be_listed |
|
53 | def test_deleted_files_should_not_be_listed | |
|
54 | @repository.fetch_changesets | |||
|
55 | @repository.reload | |||
53 | entries = @repository.entries('sources') |
|
56 | entries = @repository.entries('sources') | |
54 | assert entries.detect {|e| e.name == 'watchers_controller.rb'} |
|
57 | assert entries.detect {|e| e.name == 'watchers_controller.rb'} | |
55 | assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} |
|
58 | assert_nil entries.detect {|e| e.name == 'welcome_controller.rb'} |
General Comments 0
You need to be logged in to leave comments.
Login now