(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestErrNotFound(t *testing.T) { |
| 15 | id := model.NewId() |
| 16 | |
| 17 | t.Run("plain", func(t *testing.T) { |
| 18 | err := NewErrNotFound("channel", id) |
| 19 | |
| 20 | assert.EqualError(t, err, "resource \"channel\" not found, id: "+id) |
| 21 | }) |
| 22 | t.Run("with wrapped error", func(t *testing.T) { |
| 23 | err := NewErrNotFound("channel", id) |
| 24 | err = err.Wrap(errors.New("some error")) |
| 25 | |
| 26 | assert.EqualError(t, err, "resource \"channel\" not found, id: "+id+", error: some error") |
| 27 | }) |
| 28 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…