Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
935c6739
Commit
935c6739
authored
Jan 31, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention named HTTP status codes in dev docs
parent
7ad73258
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
doc/development/testing_guide/best_practices.md
doc/development/testing_guide/best_practices.md
+9
-0
No files found.
doc/development/testing_guide/best_practices.md
View file @
935c6739
...
@@ -545,6 +545,15 @@ why without editing the source and rerun the tests.
...
@@ -545,6 +545,15 @@ why without editing the source and rerun the tests.
This is especially useful whenever it's showing 500 internal server error.
This is especially useful whenever it's showing 500 internal server error.
Prefer named HTTP status like
`:no_content`
over its numeric representation
`206`
. See a list of
[
supported status codes
](
https://github.com/rack/rack/blob/f2d2df4016a906beec755b63b4edfcc07b58ee05/lib/rack/utils.rb#L490
)
.
Example:
```
ruby
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
```
### Shared contexts
### Shared contexts
Shared contexts only used in one spec file can be declared inline.
Shared contexts only used in one spec file can be declared inline.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment