mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Add test and bugfix to include an array of string
This commit is contained in:
@@ -44,6 +44,19 @@ module ActiveModel
|
||||
|
||||
assert_equal(expected, actual)
|
||||
end
|
||||
|
||||
def test_array_of_string
|
||||
expected = {
|
||||
comments: { author: {}, attachment: {} }
|
||||
}
|
||||
input = [
|
||||
'comments.author',
|
||||
'comments.attachment'
|
||||
]
|
||||
actual = Parsing.include_args_to_hash(input)
|
||||
|
||||
assert_equal(expected, actual)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user