(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func TestError(t *testing.T) { |
| 28 | message := "Sync Gateway is not listening on 4984!" |
| 29 | sgError := sgError{message: message} |
| 30 | assert.Equal(t, message, sgError.Error()) |
| 31 | |
| 32 | message = "Unknown error" |
| 33 | sgError.message = "" |
| 34 | assert.Equal(t, message, sgError.Error()) |
| 35 | } |
| 36 | |
| 37 | func TestErrorAsHTTPStatus(t *testing.T) { |
| 38 | code, text := ErrorAsHTTPStatus(nil) |