From: Toshi MARUYAMA Date: Tue, 10 Nov 2020 11:09:38 +0000 (+0000) Subject: shorten long line of test/unit/lib/redmine/views/builders/json_test.rb X-Git-Tag: 4.2.0~496 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=399cc9748cec6d2a003475fce05f34e1e97b01ed;p=redmine.git shorten long line of test/unit/lib/redmine/views/builders/json_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@20322 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/lib/redmine/views/builders/json_test.rb b/test/unit/lib/redmine/views/builders/json_test.rb index a20f92ab9..dc5790ac5 100644 --- a/test/unit/lib/redmine/views/builders/json_test.rb +++ b/test/unit/lib/redmine/views/builders/json_test.rb @@ -76,7 +76,14 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end def test_array_with_content_tags - assert_json_output({'books' => [{'value' => 'Book 1', 'author' => 'B. Smith'}, {'value' => 'Book 2', 'author' => 'G. Cooper'}]}) do |b| + assert_json_output( + { + 'books' => [ + {'value' => 'Book 1', 'author' => 'B. Smith'}, + {'value' => 'Book 2', 'author' => 'G. Cooper'} + ] + } + ) do |b| b.array :books do |b| b.book 'Book 1', :author => 'B. Smith' b.book 'Book 2', :author => 'G. Cooper' @@ -98,7 +105,16 @@ class Redmine::Views::Builders::JsonTest < ActiveSupport::TestCase end def test_request_response - assert_json_output({'request' => { 'get' => 'book' }, 'response' => { 'book' => { 'title' => 'Book 1' } }}) do |b| + assert_json_output( + { + 'request' => { + 'get' => 'book' + }, + 'response' => { + 'book' => {'title' => 'Book 1'} + } + } + ) do |b| b.request do b.get 'book' end