From abae8f34f377519946a91101ef7abf504454531c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 31 Mar 2020 21:08:05 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- doc/development/testing_guide/best_practices.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/development') diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 108003b2d76..31a449dbbb2 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -543,7 +543,8 @@ expect(metrics.merged_at).to be_like_time(time) #### `have_gitlab_http_status` -Prefer `have_gitlab_http_status` over `have_http_status` because the former +Prefer `have_gitlab_http_status` over `have_http_status` and +`expect(response.status).to` because the former could also show the response body whenever the status mismatched. This would be very useful whenever some tests start breaking and we would love to know why without editing the source and rerun the tests. -- cgit v1.2.3