Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Weird behavior with seed #1123

Open
deshiloh opened this issue Mar 26, 2024 · 0 comments
Open

[Bug]: Weird behavior with seed #1123

deshiloh opened this issue Mar 26, 2024 · 0 comments
Labels

Comments

@deshiloh
Copy link

What Happened

Here my two test

test("Can login super user", function() {
    $this->seed();

    post(route('login'), [
        'email' => 'test1@test.com',
        'password' => 'test'
    ])
        ->assertSessionHasNoErrors()
        ->assertRedirect(route('admin.homepage'))
    ;
});

test("Can login user", function() {
    $this->seed();

    post(route('login'), [
        'email' => 'test2@test.com',
        'password' => 'test'
    ])
        ->assertSessionHasNoErrors()
        ->assertRedirect(route('front.reservation.list'))
    ;
});

When I run them, the second failed.
When I run the first and the second separately, it works... How ?

How to Reproduce

Install fresh laravel app with pestphp, use defaults login scripts.

Sample Repository

No response

Pest Version

2.34.5

PHP Version

8.1.25

Operation System

macOS

Notes

No response

@deshiloh deshiloh added the bug label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant