File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ def redmine_gtt_print_issue_to_json(context)
6
6
issue = context [ :issue ]
7
7
json = context [ :json ]
8
8
attributes = json [ :attributes ] ||= { }
9
- attributes [ :supply_items ] = IssueSupplyItemsPresenter . ( issue . issue_supply_items )
10
- attributes [ :resource_items ] = ResourceItemsPresenter . ( issue . resource_items )
9
+ attributes [ :supply_items ] = IssueSupplyItemsPresenter . ( issue . issue_supply_items ) . join ( " \r \n " )
10
+ attributes [ :resource_items ] = ResourceItemsPresenter . ( issue . resource_items ) . join ( " \r \n " )
11
11
end
12
12
end
13
13
end
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ class HooksTest < ActiveSupport::TestCase
18
18
json = { foo : 'bar' }
19
19
RedmineSupply ::Hooks . instance . redmine_gtt_print_issue_to_json ( issue : @issue ,
20
20
json : json )
21
- assert items = json [ :attributes ] [ :supply_items ]
21
+ assert items = json [ :attributes ] [ :supply_items ] . split ( '\r\n' )
22
22
assert_equal 1 , items . size
23
23
assert_equal "#{ @item . name } (1.0 pcs)" , items . first
24
24
25
- assert items = json [ :attributes ] [ :resource_items ]
25
+ assert items = json [ :attributes ] [ :resource_items ] . split ( '\r\n' )
26
26
assert_equal 1 , items . size
27
27
assert_equal @resource . name , items . first
28
28
You can’t perform that action at this time.
0 commit comments