diff --git a/pkg/apis/messaging/v1/subscription_validation_test.go b/pkg/apis/messaging/v1/subscription_validation_test.go index e31086eba6..a330806b6b 100644 --- a/pkg/apis/messaging/v1/subscription_validation_test.go +++ b/pkg/apis/messaging/v1/subscription_validation_test.go @@ -217,6 +217,21 @@ func TestSubscriptionSpecValidation(t *testing.T) { }, }, want: apis.ErrMissingField("subscriber.ref.name"), + }, { + name: "missing name in Subscriber.Ref", + c: &SubscriptionSpec{ + Channel: getValidChannelRef(), + Subscriber: getValidDestination(), + Reply: &duckv1.Destination{ + Ref: &duckv1.KReference{ + Namespace: namespace, + Name: "", + Kind: channelKind, + APIVersion: channelAPIVersion, + }, + }, + }, + want: apis.ErrMissingField("reply.ref.name"), }} for _, test := range tests {