From a92e115e1925034d3cae6b7c173a4a12e810e667 Mon Sep 17 00:00:00 2001 From: JessRudder Date: Mon, 28 Nov 2016 19:28:40 -0500 Subject: Add note about step needed to get tests to pass if you implemented basic auth [ci skip] --- guides/source/testing.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guides/source/testing.md') diff --git a/guides/source/testing.md b/guides/source/testing.md index bc1f78fb2a..29a9537141 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -800,6 +800,13 @@ end Now you can try running all the tests and they should pass. +NOTE: If you followed the steps in the Basic Authentication section, you'll need to add the following to the `setup` block to get all the tests passing: + +```ruby +request.headers['Authorization'] = ActionController::HttpAuthentication::Basic. + encode_credentials('dhh', 'secret') +``` + ### Available Request Types for Functional Tests If you're familiar with the HTTP protocol, you'll know that `get` is a type of request. There are 6 request types supported in Rails functional tests: -- cgit v1.2.3