<commit_before><?php

namespace Tests\Feature;

use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;

use App;

class LoginTest extends TestCase
{
    use DatabaseMigrations;

    public function testBasicTest()
    {
        $this->get('/')->assertRedirect('/login');
        $this->get('/', [ 'X-Requested-With' => 'XMLHttpRequest' ])
            ->assertStatus(401);
    }

    public function testLoggedIn()
    {
        $user = [
            'email' => '<EMAIL>',
            'name' => 'Example',
            'password' => '<PASSWORD>',
        ];

        factory(App\User::class)->create($user);
        $this->post('/login', $user)->assertRedirect('/');
    }

    public function testLogout()
    {
        $user = factory(App\User::class)->create();
        $this->actingAs($user)->post('/logout')->assertRedirect('/');
    }
}<commit_msg>Fix a problem that coverage decreased<commit_after><?php

namespace Tests\Feature;

use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;

use App;

class LoginTest extends TestCase
{
    use DatabaseMigrations;

    public function testBasicTest()
    {
        $this->get('/')->assertRedirect('/login');
        $this->get('/', [ 'X-Requested-With' => 'XMLHttpRequest' ])
            ->assertStatus(401);
    }

    public function testLoggedIn()
    {
        $user = factory(App\User::class)->create();
        $this->actingAs($user)->get('/')->assertStatus(200);
    }

    public function testLogout()
    {
        $user = factory(App\User::class)->create();
        $this->actingAs($user)->post('/logout')->assertRedirect('/');
    }
}
{'fraction_non_alphanumeric': 0.16684665226781858, 'fraction_numerical': 0.004859611231101512, 'mean_word_length': 3.0905077262693155, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7291691', 'n_tokens_mistral': 538, 'n_tokens_neox': 537, 'n_words': 90}