title: Devise integration test always fails
body: <p>I am trying to test my sign in for Devise in rails, but no matter what I do I get a 401 unauthorized error. I think I have set up my testing wrong or something. I don't think it's a syntax error. </p>
  
  <p>Here is what my fixture looks like.</p>
  
  <pre><code>one:
    firstname: John
    lastname: Smith
    email: example@email.com
    encrypted_password: &lt;%= Devise::Encryptor.digest(Traveler, 'password') %&gt;
    confirmed_at: 2016-01-02 08:31:23
    confirmation_sent_at: 2016-01-02 08:30:59
  </code></pre>
  
  <p>This is what my controller (integration) test looks like. </p>
  
  <pre><code>require 'test_helper'
  
  class TourControllerTest &lt; ActionDispatch::IntegrationTest
    include Devise::Test::IntegrationHelpers
    def setup
      @traveler = travelers(:one)
    end
  
    test "successful login of confirmed user" do
      get traveler_session_path
      assert_equal 200, status
      post traveler_session_path 'traveler[email]' =&gt; @traveler.email, 'traveler[password]' =&gt; @traveler.encrypted_password
      follow_redirect!
      assert_equal 200, status
    end
  end
  </code></pre>
  
  <p>My test.log looks like this</p>
  
  <pre><code>-----------------------------------------------------------
  TourControllerTest: test_successful_login_of_confirmed_user
  -----------------------------------------------------------
    [1m[36mTraveler Load (0.1ms)[0m  [1m[34mSELECT  "travelers".* FROM "travelers" WHERE "travelers"."id" = ? LIMIT ?[0m  [["id", 980190962], ["LIMIT", 1]]
  Started GET "/login" for 127.0.0.1 at 2018-03-31 23:43:28 -0400
  Processing by Devise::SessionsController#new as HTML
    Rendering devise/sessions/new.html.erb within layouts/application
    Rendered devise/sessions/new.html.erb within layouts/application (7.9ms)
    Rendered shared/_navbar.html.erb (3.6ms)
    Rendered shared/_message.html.erb (0.9ms)
  Completed 200 OK in 559ms (Views: 557.2ms | ActiveRecord: 0.0ms)
  Started POST "/login?traveler%5Bemail%5D=example%40email.com&amp;traveler%5Bpassword%5D=[FILTERED]" for 127.0.0.1 at 2018-03-31 23:43:29 -0400
  Processing by Devise::SessionsController#create as HTML
    Parameters: {"traveler"=&gt;{"email"=&gt;"example@email.com", "password"=&gt;"[FILTERED]"}}
  [1m[36mTraveler Load (0.4ms)[0m  [1m[34mSELECT  "travelers".* FROM "travelers" WHERE "travelers"."email" = ? ORDER BY "travelers"."id" ASC LIMIT ?[0m  [["email", "example@email.com"], ["LIMIT", 1]]
  Completed 401 Unauthorized in 6ms (ActiveRecord: 0.4ms)
  Processing by Devise::SessionsController#new as HTML
    Parameters: {"traveler"=&gt;{"email"=&gt;"example@email.com", "password"=&gt;"[FILTERED]"}}
    Rendering devise/sessions/new.html.erb within layouts/application
    Rendered devise/sessions/new.html.erb within layouts/application (1.1ms)
    Rendered shared/_navbar.html.erb (1.0ms)
    Rendered shared/_message.html.erb (0.1ms)
  Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.0ms)
    [1m[35m (0.1ms)[0m  [1m[31mrollback transaction[0m
  </code></pre>