| 2832 | } |
| 2833 | |
| 2834 | func AssertHTTPErrorReason(t testing.TB, response *TestResponse, expectedStatus int, expectedReason string) { |
| 2835 | var httpError struct { |
| 2836 | Reason string `json:"reason"` |
| 2837 | } |
| 2838 | err := base.JSONUnmarshal(response.BodyBytes(), &httpError) |
| 2839 | require.NoError(t, err, "Failed to unmarshal HTTP error: %v", response.BodyBytes()) |
| 2840 | |
| 2841 | AssertStatus(t, response, expectedStatus) |
| 2842 | |
| 2843 | assert.Equal(t, expectedReason, httpError.Reason) |
| 2844 | } |
| 2845 | |
| 2846 | func AssertRevTreeAfterHLVConflictResolution(t *testing.T, doc *db.Document, expectedActiveRevTreeID, expectedTombstoneParentID string) { |
| 2847 | activeLeafCount := 0 |