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:
- 1208 Bytes
1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | |
3 | class TicketChangeTest < Test::Unit::TestCase |
4 | fixtures :ticket_changes |
5 | |
6 | def setup |
7 | @ticket_change = TicketChange.find(1) |
8 | end |
9 | |
10 | def test_search |
11 | q = TicketChange.search("a comment") |
12 | exp = [{:content=>"a comment", |
13 | :title=>"Ticket #1 comment by johan", |
14 | :link=>{:id=>1, :controller=>"/tickets", :action=>"show"}}] |
15 | assert_equal exp, q |
16 | end |
17 | |
18 | def test_each_log |
19 | change = TicketChange.new do |c| |
20 | c.log = {'Status' => %w{Open Fixed}, 'Part' => %w{Part1 Part2}} |
21 | end |
22 | result = [] |
23 | change.each_log{|c| result << c} |
24 | assert_equal [["Status", "Open", "Fixed"], ["Part", "Part1", "Part2"]], result |
25 | |
26 | #result = [] |
27 | #@ticket_change.each_log{|c| result << c} |
28 | #assert_equal [["Status", "Open", "Fixed"], ["Part", "Part1", "Part2"]], result |
29 | end |
30 | |
31 | def test_empty |
32 | change = TicketChange.new do |c| |
33 | c.comment = 'a comment' |
34 | c.log = {'Part' => %w{Part1 Part2}} |
35 | c.attachment = 'file.txt' |
36 | end |
37 | assert !change.empty? |
38 | change.comment = nil |
39 | assert !change.empty? |
40 | change.log = {} |
41 | assert !change.empty? |
42 | change.attachment = nil |
43 | assert change.empty? |
44 | end |
45 | end |