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

Fix acting as null user not reset existing user in test #11674

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

nanaya
Copy link
Collaborator

@nanaya nanaya commented Nov 21, 2024

There's this test but it's testing test helper so I'm not sure if it makes sense testing it? 🤔 Can jam it somewhere... (where?)

    public function testWat()
    {
        $user = User::factory()->create();
        $this->actAsScopedUser($user, ['public']);
        $this->assertSame(\Auth::user()->getKey(), $user->getKey());

        $this->actAsScopedUser(null, ['public']);
        $this->assertNull(\Auth::user());
    }

@notbakaneko notbakaneko merged commit 2b827cd into ppy:master Nov 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants