title: Testing multi Auth in Laravel
body: <p>In my app, I use the Multi Authentication. (I used <a href="https://devmarketer.io/learn/setting-multi-authentication-laravel-5-4-part-1/" rel="nofollow noreferrer">this link</a>)</p>
  
  <p>It works, and I can log as a user -> I am redirected to "/home"</p>
  
  <p>as an admin, when I log in, I am redirected to "/admin_home"</p>
  
  <p>when connected, admin can't access to "/home", he is redirected to another page</p>
  
  <p>But when I write this test :</p>
  
  <pre><code>class AdminTest extends TestCase
  {
      public function setUp()
      {
          parent::setUp();
          Artisan::call('migrate');
          Artisan::call('db:seed');
      }
  
      public function tearDown()
      {
          Artisan::call('migrate:reset');
          parent::tearDown();
      }
  
  
      public function testCannotAccessUserSpace()
      {
          $admin = Admin::find(1);
  
          $response = $this-&gt;actingAs($admin, 'admin')
              -&gt;get('/home');
  
          $response-&gt;assertStatus(200);
      }
  
  }
  </code></pre>
  
  <p>I have a success response but I know the admin cannot access "home" space</p>
  
  <p>What's wrong in my test ?</p>