Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 24
- Log:
Initial import of Collaboa 0.5.6 from downloaded Tarball. Collaboa is
a Ruby On Rails based bug tracker and SVN repository browsing tool.
- Author:
- adh
- Date:
- Mon Jul 24 21:54:39 +0100 2006
- Size:
- 2457 Bytes
1 | require 'test_util' |
2 | |
3 | class Repos < ActionSubversion::Base |
4 | end |
5 | |
6 | class FileBrowserTest < Test::Unit::TestCase |
7 | include ActionSubversionTestUtil |
8 | |
9 | def setup |
10 | setup_repos |
11 | @root_entries = Repos.get_node_entries('/') |
12 | end |
13 | |
14 | def test_view_nodes_and_their_attrs |
15 | assert_equal Array, @root_entries.class |
16 | assert_equal ActionSubversion::RepositoryNode, @root_entries.first.class |
17 | assert_equal "copied a file. moved another file.\n", @root_entries.first.log |
18 | |
19 | assert_equal 1, @root_entries.last.revision |
20 | assert_equal 'johan', @root_entries.last.author |
21 | assert_equal 'text/html', @root_entries.last.mime_type |
22 | assert_equal 'html_file.html', @root_entries.last.name |
23 | assert_equal '/html_file.html', @root_entries.last.path |
24 | assert_equal 'importing test data', @root_entries.last.log |
25 | assert_equal 'importing test data', @root_entries.last.log_message |
26 | assert_equal 96, @root_entries.last.size |
27 | assert_equal Time, @root_entries.last.date.class |
28 | assert_equal 'Sat May 28 22:58:00 CEST 2005', @root_entries.last.date.to_s |
29 | assert @root_entries.last.file? |
30 | assert !@root_entries.last.dir? |
31 | |
32 | #file1 = @root_entries.find {|e| e.name == "file.txt"} |
33 | #assert_equal 11, file1.revision |
34 | #assert_equal "deleted a file + moved a file + copied a file\n", file1.log |
35 | end |
36 | |
37 | def test_is_dir |
38 | assert Repos.is_dir?('html') |
39 | assert !Repos.is_dir?('file1.txt') |
40 | end |
41 | |
42 | def test_rev_can_be_string |
43 | node = nil |
44 | assert_nothing_raised { |
45 | node = Repos.get_node_entry('file1.txt', '3') |
46 | } |
47 | node_again = Repos.get_node_entry('file1.txt', 3) |
48 | assert_equal node.revision, node_again.revision |
49 | end |
50 | |
51 | def test_get_mime_type |
52 | assert_equal 'text/html', Repos.get_mime_type('/html/html_file.html') |
53 | assert_equal 'text/x-ruby', Repos.get_mime_type('ruby.rb') |
54 | #assert_equal 'application/octet-stream', Repos.get_mime_type('random-bins.bin') |
55 | # test to see if file without extension gets the text/plain mimetype |
56 | assert_equal 'text/plain', Repos.get_mime_type('xaa') |
57 | end |
58 | |
59 | def test_get_contents |
60 | expected_content = "I am the silly test file!\n" |
61 | assert_equal expected_content, Repos.get_file_contents('file.txt') |
62 | end |
63 | |
64 | def test_get_node_entry |
65 | entry = Repos.get_node_entry('/') |
66 | assert_equal ActionSubversion::RepositoryNode, entry.class |
67 | assert_equal '/', entry.name |
68 | assert_equal '/', entry.path |
69 | end |
70 | |
71 | def teardown |
72 | teardown_repos |
73 | end |
74 | end |