templates/default/service/test/method/_client.erb in gapic-generator-0.6.1 vs templates/default/service/test/method/_client.erb in gapic-generator-0.6.2
- old
+ new
@@ -75,9 +75,15 @@
<%- 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 -%>
+ <%- if field.oneof? && !field.proto3_optional? -%>
+ assert_equal :<%= field.name %>, r.<%= field.oneof_name %>
+ <%- end -%>
+ <%- if field.proto3_optional? -%>
+ assert r.has_<%= field.name %>?
+ <%- end -%>
<%- end -%>
end
end
end
end