diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 21:09:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 21:09:51 +0300 |
commit | bd979acf95124119d41f75d34cab231229f4dd81 (patch) | |
tree | a7ce5127c8ab6d42b27aa8342889c54d2f0090b2 /doc/development/testing_guide | |
parent | 4bdfcf93f224edb9c4daff90d95b0c6c92766ea3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/testing_guide')
-rw-r--r-- | doc/development/testing_guide/best_practices.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 6edfd5add48..e257bddb900 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -1340,6 +1340,12 @@ Example: expect(metrics.merged_at).to be_like_time(time) ``` +Example for `be_within`: + +```ruby +expect(violation.reload.merged_at).to be_within(0.00001.seconds).of(merge_request.merged_at) +``` + #### `have_gitlab_http_status` Prefer `have_gitlab_http_status` over `have_http_status` and |