@@ -1,16 +1,16 | |||
|
1 |
# |
|
|
2 |
# Copyright (C) 2006-20 |
|
|
1 | # Redmine - project management software | |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 |
# |
|
|
8 | # | |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 |
# |
|
|
13 | # | |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
@@ -33,11 +33,11 class RepositoryBazaarTest < ActiveSupport::TestCase | |||
|
33 | 33 | assert @repository |
|
34 | 34 | end |
|
35 | 35 | |
|
36 |
if File.directory?(REPOSITORY_PATH) |
|
|
36 | if File.directory?(REPOSITORY_PATH) | |
|
37 | 37 | def test_fetch_changesets_from_scratch |
|
38 | 38 | @repository.fetch_changesets |
|
39 | 39 | @repository.reload |
|
40 | ||
|
40 | ||
|
41 | 41 | assert_equal 4, @repository.changesets.count |
|
42 | 42 | assert_equal 9, @repository.changes.count |
|
43 | 43 | assert_equal 'Initial import', @repository.changesets.find_by_revision('1').comments |
@@ -49,7 +49,7 class RepositoryBazaarTest < ActiveSupport::TestCase | |||
|
49 | 49 | @repository.changesets.find(:all).each {|c| c.destroy if c.revision.to_i > 2} |
|
50 | 50 | @repository.reload |
|
51 | 51 | assert_equal 2, @repository.changesets.count |
|
52 | ||
|
52 | ||
|
53 | 53 | @repository.fetch_changesets |
|
54 | 54 | assert_equal 4, @repository.changesets.count |
|
55 | 55 | end |
@@ -57,14 +57,14 class RepositoryBazaarTest < ActiveSupport::TestCase | |||
|
57 | 57 | def test_entries |
|
58 | 58 | entries = @repository.entries |
|
59 | 59 | assert_equal 2, entries.size |
|
60 | ||
|
60 | ||
|
61 | 61 | assert_equal 'dir', entries[0].kind |
|
62 | 62 | assert_equal 'directory', entries[0].name |
|
63 | ||
|
63 | ||
|
64 | 64 | assert_equal 'file', entries[1].kind |
|
65 | 65 | assert_equal 'doc-mkdir.txt', entries[1].name |
|
66 | 66 | end |
|
67 | ||
|
67 | ||
|
68 | 68 | def test_entries_in_subdirectory |
|
69 | 69 | entries = @repository.entries('directory') |
|
70 | 70 | assert_equal 3, entries.size |
General Comments 0
You need to be logged in to leave comments.
Login now