Skip to content

Commit

Permalink
Add negative test case for nested fields
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Oct 25, 2024
1 parent c5501ad commit dbbc940
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions matchers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@ func TestProtoEqualMatcher(t *testing.T) {
},
shouldMatch: false,
},
{
name: "Should not match messages with different nested fields",
actual: &test.Foo{
Bar: "test-bar",
Baz: "test-baz",
Qux: &test.Qux{
Driver: "foo-driver",
Handle: "foo-handle",
},
},
expected: &test.Foo{
Bar: "test-bar",
Baz: "test-baz",
Qux: &test.Qux{
Driver: "different-driver",
Handle: "foo-handle",
},
},
shouldMatch: false,
},
}

// Run test cases
Expand Down

0 comments on commit dbbc940

Please sign in to comment.