templates/default/service/test/method/_bidi.erb in gapic-generator-0.6.2 vs templates/default/service/test/method/_bidi.erb in gapic-generator-0.6.3
- old
+ new
@@ -84,11 +84,13 @@
assert_equal 4, <%= method.name %>_client_stub.call_rpc_count
<%= method.name %>_client_stub.requests.each do |request|
request.to_a.each do |r|
assert_kind_of <%= method.request_type %>, r
<%- fields.each do |field| -%>
- <%- if field.message? && field.repeated? -%>
- assert_kind_of <%= field.type_name_full %>, request.<%= field.name %>.first
+ <%- if field.message? && field.repeated? && !field.map? -%>
+ assert_kind_of <%= field.type_name_full %>, r.<%= field.name %>.first
+ <%- elsif field.map? -%>
+ assert_equal(<%= field.default_value %>, r.<%= field.name %>.to_h)
<%- elsif field.message? -%>
assert_equal Gapic::Protobuf.coerce(<%= field.default_value %>, to: <%= field.type_name_full %>), r.<%= field.name %>
<%- else -%>
assert_equal <%= field.default_value %>, r.<%= field.name %>
<%- end -%>