<commit_before><?php

namespace Tests\Feature\OMR;

use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Notifications\DatabaseNotification;
use Tests\TestCase;

class NotificationTest extends TestCase
{
    use DatabaseTransactions;

    public function setUp()
    {
      $this->dontSetupDatabase();
      parent::setUp();
    }

    /** @test */
    public function get_notification_from_route()
    {
        DatabaseNotification::truncate();
        create(DatabaseNotification::class);
        $this->visit(route('frontend.index'));
        $this->assertPageLoaded(route('frontend.index'));
    }

    /** @test */
    public function a_user_can_fetch_their_unread_notifications()
    {
        create(DatabaseNotification::class);

        $this->assertCount(1,
            $this->getJson("/profiles/" . auth()->user()->name . "/notifications")->json());
    }
}<commit_msg>update notification test<commit_after><?php

namespace Tests\Feature\OMR;

use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Notifications\DatabaseNotification;
use Tests\BrowserKitTestCase;
use Tests\TestCase;

class NotificationTest extends BrowserKitTestCase
{
    use DatabaseTransactions;

    public function setUp()
    {
      $this->dontSetupDatabase();
      parent::setUp();
    }

    /** @test */
    public function get_notification_from_route()
    {
        DatabaseNotification::truncate();
        create(DatabaseNotification::class);
        $this->visit(route('frontend.index'));
        $this->assertPageLoaded(route('frontend.index'));
    }

    /** @test */
    public function a_user_can_fetch_their_unread_notifications()
    {
        $this->actingAs($this->executive);
        $notification = create(DatabaseNotification::class);
        $response = $this->get(url("/users/{$this->executive->id}/notifications"));

        $this->assertCount(1,
            $this->json('GET', url("/users/{$this->executive->id}/notifications"))->response->getData());
    }
}
{'fraction_non_alphanumeric': 0.14299950174389636, 'fraction_numerical': 0.000996512207274539, 'mean_word_length': 3.5636363636363635, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '511229', 'n_tokens_mistral': 561, 'n_tokens_neox': 554, 'n_words': 81}