title: why i'm getting this error ::Expected response to be a <2XX: success>, but was a <302: Found> redirect to <http://www.example.com/users/sign_in>
body: <p><code>After running `RAILS_ENV=test rails test test/controllers</code>  i'm getting</p>
  
  <p><code>Expected response to be a &lt;2XX: success&gt;, but was a &lt;302: Found&gt;redirect to &lt;http://www.example.com/users/sign_in&gt;</code></p>
  
  <p>Response body:You are being <a href="http://www.example.com/users/sign_in" rel="nofollow noreferrer">redirected</a>.</p>
  
  <p>======================</p>
  
  <pre><code>
  class OpeningsControllerTest &lt; ActionDispatch::IntegrationTest
  
    test "should get new" do
      get new_opening_url
      assert_response :success
    end
  end**
  </code></pre>