Patch #31965

Add missing fixtures to Redmine::ApiTest::VersionsTest

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

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


Category:Code cleanup/refactoring
Target version:4.1.0


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:


NoMethodError: undefined method `title' for nil:NilClass
    test/integration/api_test/versions_test.rb:77:in `block (2 levels) in <class:VersionsTest>'
    test/integration/api_test/versions_test.rb:75:in `block in <class:VersionsTest>'

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


NoMethodError: undefined method `title' for nil:NilClass
    test/integration/api_test/versions_test.rb:141:in `block in <class:VersionsTest>'

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
-           :versions
+           :versions,
+           :wikis, :wiki_pages

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

Associated revisions

Revision 18407
Added by Go MAEDA 11 months ago

Add missing fixtures to Redmine::ApiTest::VersionsTest (#31965).

Patch by Yuichi HARADA.


#1 Updated by Go MAEDA 11 months ago

  • Target version set to 4.1.0

#2 Updated by Go MAEDA 11 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the fix. Thank you.

Also available in: Atom PDF