templates/default/service/test/method/_normal.erb in gapic-generator-0.6.1 vs templates/default/service/test/method/_normal.erb in gapic-generator-0.6.2

- old
+ new

@@ -24,9 +24,15 @@ <%- elsif field.message? -%> assert_equal Gapic::Protobuf.coerce(<%= field.default_value %>, to: <%= field.type_name_full %>), request.<%= field.name %> <%- else -%> assert_equal <%= field.default_value %>, request.<%= field.name %> <%- end -%> + <%- if field.oneof? && !field.proto3_optional? -%> + assert_equal :<%= field.name %>, request.<%= field.oneof_name %> + <%- end -%> + <%- if field.proto3_optional? -%> + assert request.has_<%= field.name %>? + <%- end -%> <%- end -%> refute_nil options end Gapic::ServiceStub.stub :new, <%= method.name %>_client_stub do