Actions
Patch #31705
closedAdd missing fixtures to AttachmentFormatVisibilityTest
Description
The test has failed.
https://www.redmine.org/builds/logs/build_trunk_sqlite3_ruby-2.6_456.html
E Error: AttachmentFormatVisibilityTest#test_attachment_should_be_visible_with_visible_custom_field: ActiveRecord::RecordNotUnique: SQLite3::ConstraintException: UNIQUE constraint failed: custom_fields_trackers.custom_field_id, custom_fields_trackers.tracker_id: INSERT INTO "custom_fields_trackers" ("custom_field_id", "tracker_id") VALUES (?, ?) test/object_helpers.rb:204:in `generate!' test/object_helpers.rb:209:in `generate!' test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb:36:in `test_attachment_should_be_visible_with_visible_custom_field' bin/rails test test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb:35 E Error: AttachmentFormatVisibilityTest#test_attachment_should_be_visible_with_limited_visibility_custom_field: ActiveRecord::RecordNotUnique: SQLite3::ConstraintException: UNIQUE constraint failed: custom_fields_trackers.custom_field_id, custom_fields_trackers.tracker_id: INSERT INTO "custom_fields_trackers" ("custom_field_id", "tracker_id") VALUES (?, ?) test/object_helpers.rb:204:in `generate!' test/object_helpers.rb:209:in `generate!' test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb:50:in `test_attachment_should_be_visible_with_limited_visibility_custom_field' bin/rails test test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb:49
I think that because the fixtures is not enough.
diff --git a/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb b/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
index b648ac11f..c9fee583a 100644
--- a/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
+++ b/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
@@ -25,6 +25,7 @@ class AttachmentFormatVisibilityTest < ActionView::TestCase
:roles, :members, :member_roles,
:users, :email_addresses,
:trackers, :issue_statuses, :enumerations, :issue_categories,
+ :custom_fields, :custom_fields_trackers,
:versions, :issues
def setup
Actions