Patch #35413
closed
Add missing fixtures to ActivitiesControllerTest
Added by Yuichi HARADA over 3 years ago.
Updated over 3 years ago.
Category:
Code cleanup/refactoring
Description
ActivitiesControllerTest has failed.
% RAILS_ENV=test bundle exec rake db:migrate:reset
% RAILS_ENV=test bundle exec rake test TEST=test/functional/activities_controller_test.rb
Run options: --seed 56469
# Running:
.........F
Failure:
ActivitiesControllerTest#test_index_atom_feed_should_respect_feeds_limit_setting [test/functional/activities_controller_test.rb:139]:
Expected exactly 20 elements matching "entry", found 12..
Expected: 20
Actual: 12
rails test test/functional/activities_controller_test.rb:128
.......
Finished in 2.293125s, 7.4135 runs/s, 24.4208 assertions/s.
17 runs, 56 assertions, 1 failures, 0 errors, 0 skips
Files
The models of Activity are registered in source:trunk/lib/redmine.rb#L420, but some fixtures were not declared in ActivitiesControllerTest.
Redmine::Activity.map do |activity|
activity.register :issues, :class_name => %w(Issue Journal)
activity.register :changesets
activity.register :news
activity.register :documents, :class_name => %w(Document Attachment)
activity.register :files, :class_name => 'Attachment'
activity.register :wiki_edits, :class_name => 'WikiContentVersion', :default => false
activity.register :messages, :default => false
activity.register :time_entries, :default => false
end
It was solved with the following patch.
diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb
index 6bc43da5e..6a722d8a1 100644
--- a/test/functional/activities_controller_test.rb
+++ b/test/functional/activities_controller_test.rb
@@ -28,7 +28,8 @@ class ActivitiesControllerTest < Redmine::ControllerTest
:members,
:groups_users,
:enabled_modules,
- :journals, :journal_details
+ :journals, :journal_details,
+ :attachments, :changesets, :documents, :messages, :news, :time_entries, :wiki_content_versions
def test_project_index
get(
- Target version set to 5.0.0
Confirmed the issue.
Setting the target version to 5.0.0.
- Related to Defect #34933: Atom feed of the activity page does not contain items after the second page added
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Target version deleted (
5.0.0)
Committed as a part of #34933.
Also available in: Atom
PDF