プロジェクト

全般

プロフィール

Vote #74630

完了

Don't create duplicate wikis in tests

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
75
issue_org_id:
15420
author_id:
5132
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

test/fixtures/wikis.yml includes the unnecessary wiki wikis_002. test/unit/wiki_test.rb's test_create attempts to create an identical wiki, likely being the cause of this entry's inclusion. Its invalidity is that it creates a second wiki entry for project id 2, a violation of the has_one relationship between them. This was noticed with the addition of significant UNIQUE indices across a PostgreSQL instance of redmine and unit tests, where the mentioned test fails with the fixture in place.

Recommended patch is attached.


journals

Looking at this again, it seems that it would be better served to simply change the project in the wiki create test (as well as a user_test.rb test) to use an unwiki'd project. Attaching modified patch.
--------------------------------------------------------------------------------
Patch committed in r12317, thanks for poiting this out.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン2.5.0_75 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0