chore(domain): Assert errors using ErrorIS for instance and organization tests (#11789)

# Which Problems Are Solved

This is a small refactoring for tests in `backend/v3/domain` package to
use `assert.ErrorIs` instead of `assert.Equal` for error assertion.

# How the Problems Are Solved

  - Add custom `Is()` function to `MultipleObjectsUpdatedError` error
- Substitute `assert.Equal` with `assert.ErrorIs` in instance and
organization tests

# Additional Context

This was part of #11035
This commit is contained in:
Marco A.
2026-03-06 19:20:54 +01:00
committed by GitHub
parent 247e278505
commit 2793abf1e3
15 changed files with 31 additions and 26 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ func TestTextQueryMethodToTextOperation(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
got, err := TextQueryMethodToTextOperation(tc.queryOperation)
assert.Equal(t, tc.expectedError, err)
assert.ErrorIs(t, err, tc.expectedError)
assert.Equal(t, tc.expectedOperation, got)
})
}