1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-19 15:01:14 +00:00

code cleanup: rubocop: fix Performance/RedundantBlockCall in test/unit/lib/redmine/views/builders/json_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18812 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-22 12:10:03 +00:00
parent 3d342396a0
commit 1ae761d169
2 changed files with 1 additions and 2 deletions

View File

@ -532,7 +532,6 @@ Performance/RedundantBlockCall:
- 'app/controllers/application_controller.rb'
- 'lib/redmine/views/builders/structure.rb'
- 'test/functional/repositories_git_controller_test.rb'
- 'test/unit/lib/redmine/views/builders/json_test.rb'
# Cop supports --auto-correct.
Performance/RedundantMatch:

View File

@ -110,7 +110,7 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase
def assert_json_output(expected, &block)
builder = Redmine::Views::Builders::Json.new(ActionDispatch::TestRequest.create, ActionDispatch::TestResponse.create)
block.call(builder)
yield(builder)
assert_equal(expected, ActiveSupport::JSON.decode(builder.output))
end
end