プロジェクト

全般

プロフィール

Vote #80276

完了

Add missing fixtures to Redmine::ApiTest::VersionsTest

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

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

0%

予定工数:
category_id:
30
version_id:
127
issue_org_id:
31965
author_id:
362529
assigned_to_id:
332
comments:
2
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

@Redmine::ApiTest::VersionsTest@ has failed.

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

$ RAILS_ENV=test bundle exec rake test TEST=test/integration/api_test/versions_test.rb
Run options: --seed 7320

# Running:

.E

Error:
Redmine::ApiTest::VersionsTest#test_POST_/projects/:project_id/versions.xml_should_create_the_version_with_wiki_page_title:
NoMethodError: undefined method `title' for nil:NilClass
    test/integration/api_test/versions_test.rb:77:in `block (2 levels) in '
    test/integration/api_test/versions_test.rb:75:in `block in '


bin/rails test test/integration/api_test/versions_test.rb:74

..E

Error:
Redmine::ApiTest::VersionsTest#test_PUT_/versions/:id.xml_should_update_the_version:
NoMethodError: undefined method `title' for nil:NilClass
    test/integration/api_test/versions_test.rb:141:in `block in '


bin/rails test test/integration/api_test/versions_test.rb:139

....

Finished in 1.188608s, 7.5719 runs/s, 29.4462 assertions/s.
9 runs, 35 assertions, 0 failures, 2 errors, 0 skips

I think that because the fixtures is not enough.


diff --git a/test/integration/api_test/versions_test.rb b/test/integration/api_test/versions_test.rb
index 4a9bb93fa..d5385b855 100644
--- a/test/integration/api_test/versions_test.rb
+++ b/test/integration/api_test/versions_test.rb
@@ -27,7 +27,8 @@ class Redmine::ApiTest::VersionsTest < Redmine::ApiTest::Base
            :member_roles,
            :members,
            :enabled_modules,
-           :versions
+           :versions,
+           :wikis, :wiki_pages

   test "GET /projects/:project_id/versions.xml should return project versions" do
     get '/projects/1/versions.xml'

journals

--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0