Patch #31999

Add missing fixtures to TimelogCustomFieldsVisibilityTest

Added by Yuichi HARADA 9 months ago. Updated 9 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:-

Description

TimelogCustomFieldsVisibilityTest has failed.

$ RAILS_ENV=test bundle exec rake db:migrate:reset

$ RAILS_ENV=test bundle exec rake test TEST=test/functional/timelog_custom_fields_visibility_test.rb
Run options: --seed 50848

# Running:

.F

Failure:
TimelogCustomFieldsVisibilityTest#test_edit_should_not_show_custom_fields_not_visible_for_user [test/functional/timelog_custom_fields_visibility_test.rb:124]:
Expected response to be a <2XX: success>, but was a <404: Not Found>

bin/rails test test/functional/timelog_custom_fields_visibility_test.rb:111

..

Finished in 2.170411s, 1.8430 runs/s, 17.0475 assertions/s.
4 runs, 37 assertions, 1 failures, 0 errors, 0 skips

I think that because the fixtures is not enough.

diff --git a/test/functional/timelog_custom_fields_visibility_test.rb b/test/functional/timelog_custom_fields_visibility_test.rb
index d43f3a350..604dd36c7 100644
--- a/test/functional/timelog_custom_fields_visibility_test.rb
+++ b/test/functional/timelog_custom_fields_visibility_test.rb
@@ -26,11 +26,11 @@ class TimelogCustomFieldsVisibilityTest < Redmine::ControllerTest
            :roles,
            :members,
            :member_roles,
-           :issue_statuses,
+           :issues, :issue_statuses,
            :trackers,
            :projects_trackers,
            :enabled_modules,
-           :enumerations,
+           :time_entries, :enumerations,
            :workflows,
            :custom_fields, :custom_values, :custom_fields_trackers


Related issues

Related to Redmine - Feature #31859: Per role visibility settings for spent time custom fields Closed

Associated revisions

Revision 18422
Added by Go MAEDA 9 months ago

Add missing fixtures to TimelogCustomFieldsVisibilityTest (#31999).

Patch by Yuichi HARADA.

History

#1 Updated by Go MAEDA 9 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version set to 4.1.0

Committed the fix. Thank you.

#2 Updated by Go MAEDA 9 months ago

  • Target version deleted (4.1.0)

Removing the target version.

Since test_edit_should_not_show_custom_fields_not_visible_for_user was added by #31859, the reported error does not affect to 4.0-stable. r18422 should be considered as a part of #31859.

#3 Updated by Go MAEDA 9 months ago

  • Related to Feature #31859: Per role visibility settings for spent time custom fields added

Also available in: Atom PDF