From 1b7d47fb90f9bb1db22cfecb96d527dd8605e8cb Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 26 Jan 2023 16:20:59 +0400 Subject: [PATCH] Fix README --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a2c9bae0a..69e198f38 100644 --- a/README.md +++ b/README.md @@ -695,21 +695,23 @@ e.POST("/fruits"). Status(http.StatusOK) ``` -##### Support for alias in a failure message +##### Support for aliases in a failure messages ```go -// when test is failed, assertion in the failure message is Request("GET").Expect().JSON().Array().Empty() +// when the tests fails, assertion path in the failure message is: +// Request("GET").Expect().JSON().Array().Empty() e.GET("/fruits"). Expect(). Status(http.StatusOK).JSON().Array().Empty() -// add alias named fruits +// assign alias "fruits" to the Array variable fruits := e.GET("/fruits"). Expect(). Status(http.StatusOK).JSON().Array().Alias("fruits") -// assertion is fruits.Empty() +// assertion path in the failure message is now: +// fruits.Empty() fruits.Empty() ```