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

Testing with passport #789

Open
yannickdesmadryl opened this issue Feb 2, 2024 · 1 comment
Open

Testing with passport #789

yannickdesmadryl opened this issue Feb 2, 2024 · 1 comment

Comments

@yannickdesmadryl
Copy link

Hi all,

I need to write some tests. I'm working with laravel passport as authentication mechanism.

I want to test my data against the authenticated user, where you see only your own data.

But a simple test gives me always error 500, "Flat3\Lodata\Exception\Protocol\InternalServerErrorException: There is already an active transaction"

this is my test:
`#[Test]
public function it_returns_actors_data()
{
$this->authenticate();

    $response = $this->getJson($this->baseUrl . '/UserData');

    $response->assertOk();
}`

I want to check it's my own data, if pagination works and the structure of the data.

Thanks,
Yannick

@27pchrisl
Copy link
Contributor

Hi @yannickdesmadryl, I’m not sure exactly why you’d get that error, but it might be worth checking out the lodata tests themselves and copy how they do their requests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants