Skip to content

Commit

Permalink
ASdd utf8_clean(s) to wrap returned json string
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Jul 1, 2021
1 parent 2b50dab commit a8b296d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/source/app_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def json_result(klass_name, method_name)
target = @externals.public_send(klass_name)
result = target.public_send(method_name, **named_args)
content_type(:json)
{ method_name.to_s => result }.to_json
utf8_clean({ method_name.to_s => result }.to_json)
end

def to_json_object(body)
Expand Down
6 changes: 3 additions & 3 deletions app/test/kata_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ def self.id58_prefix
actual = kata_event(id, -1)
assert_equal last, actual
end

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

version_test 2, '4dK', %w(
|kata_event(id, index) retrieving saver outage tag
|kata_event(id, index) retrieving saver outage tag
|contains files from last real event
|and no stdout,stderr,status
) do
Expand All @@ -149,5 +149,5 @@ def self.id58_prefix
assert_equal expected, actual
end
end

end
5 changes: 4 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,12 @@ copy_in_saver_test_data()

cat "${TEST_DATA_DIR}/almost_full_group.v1.X9UunP.tgz" \
| docker exec -i "$(server_container)" tar -zxf - -C /

cat "${TEST_DATA_DIR}/almost_full_group.v2.U8Tt6y.tgz" \
| docker exec -i "$(server_container)" tar -zxf - -C /

cat "${TEST_DATA_DIR}/rG63fy.tgz" \
| docker exec -i "$(server_container)" tar -zxf - -C /
}

#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down

0 comments on commit a8b296d

Please sign in to comment.