test: fix self-comparison in SpringMvcContractTests by codingkiddo · Pull Request #1380 · spring-cloud/spring-cloud-openfeign (original) (raw)

Summary

This PR fixes self-comparing assertions in SpringMvcContractTests.

The affected assertions compared data.indexToName() with itself, which means they would always pass and would not verify the metadata produced for the extended interface case.

The updated assertion compares data.indexToName() against extendedData.indexToName(), matching the intent of the surrounding assertions that already compare the generated URL and HTTP method.

Testing

Ran:

./mvnw -pl spring-cloud-openfeign-core -Dtest=SpringMvcContractTests test