Defect #33829 » 33829-v3.patch
app/models/issue.rb | ||
---|---|---|
48 | 48 |
:scope => lambda {|options| options[:open_issues] ? self.open : self.all} |
49 | 49 | |
50 | 50 |
acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"}, |
51 |
:datetime => Proc.new {|o| o.updated_on}, |
|
51 | 52 |
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}}, |
52 | 53 |
:type => Proc.new {|o| 'issue' + (o.closed? ? '-closed' : '')} |
53 | 54 |
test/functional/issues_controller_test.rb | ||
---|---|---|
1246 | 1246 |
assert_select 'link[rel=self][href=?]', 'http://test.host/projects/ecookbook/issues.atom' |
1247 | 1247 |
assert_select 'link[rel=alternate][href=?]', 'http://test.host/projects/ecookbook/issues' |
1248 | 1248 |
assert_select 'entry link[href=?]', 'http://test.host/issues/1' |
1249 | ||
1250 |
assert_select 'entry' do |entries| |
|
1251 |
entries.each do |entry| |
|
1252 |
issue_id = entry.at('id').text.split('/').last.to_i |
|
1253 |
issue = Issue.find(issue_id) |
|
1254 |
formatted_updated_on = issue.updated_on.utc.iso8601 |
|
1255 |
# <updated> element should use the value of `Issue#updated_on` |
|
1256 |
assert_select entry, 'updated', text: formatted_updated_on |
|
1257 |
end |
|
1258 |
end |
|
1249 | 1259 |
end |
1250 | 1260 |
end |
1251 | 1261 |
- « Previous
- 1
- 2
- 3
- 4
- Next »