1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 23:28:02 +00:00

Add Capybara Page Status Code as a rails til.

This commit is contained in:
jbranchaud
2015-03-24 19:59:48 -05:00
parent b14902daf4
commit 62daed9251
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# Capybara Page Status Code
To quickly determine if a page is rendering as expected or not, you can
check the status code of the page. If your page is rendering successfully,
you'll see something like this:
```ruby
> page.status_code
# => 200
```
If some sort of application authorization logic is causing the page to not
render as normal, you may see something like this:
```ruby
> page.status_code
# => 403
```