File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,24 @@ def test_event_group_for_wiki_content_version
132
132
assert_equal content . page , content . event_group
133
133
end
134
134
135
+ def test_activity_contains_issue_status_update_events
136
+ issue = Issue . generate! ( :status_id => 1 )
137
+ issue . init_journal ( User . first , "Change Status" )
138
+ issue . status_id = 2
139
+ assert issue . save
140
+
141
+ events = find_events ( User . anonymous , :project => @project )
142
+ target_issue_events = events . find_all { |event | event == issue || ( event . is_a? ( Journal ) && event . issue == issue ) }
143
+ target_issue_events . sort! { |x , y | x . event_datetime <=> y . event_datetime }
144
+
145
+ event_titles = target_issue_events . map { |e | e . event_title }
146
+ assert_equal ( "Bug ##{ issue . id } (New): Generated" , event_titles [ 0 ] , "event title should includes (New)" )
147
+ assert_equal ( "Bug ##{ issue . id } (Assigned): Generated" , event_titles [ 1 ] , "event title should includes (Assinged)" )
148
+ end
149
+
150
+ # TODO: test when no journal
151
+ # TODO: test when three or more journal
152
+
135
153
class TestActivityProviderWithPermission
136
154
def self . activity_provider_options
137
155
{ 'test' => { :permission => :custom_permission } }
You can’t perform that action at this time.
0 commit comments