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

Platform API returns batches where parent wiki has been deleted #776

Merged
merged 4 commits into from Apr 2, 2024

Conversation

m90
Copy link
Contributor

@m90 m90 commented Apr 2, 2024

@@ -34,9 +34,17 @@ public function tearDown (): void
public function testGetEmpty (): void
{
$this->json('GET', $this->route.'/getBatches')
->assertJson([])
->assertJsonCount(0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never worked until now and would have let any response wrapped in an array pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Luckily, it's also the only place in the tests where we seem to do this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: that's a good catch; on googling it looks like we could also have $response->assertExactJson(..) which doesn't do this more permissive check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good to know, will change.

@@ -14,6 +14,7 @@ public function handle(): void
['pending_since', '=', null],
['updated_at', '<', Carbon::now()->subMonths(1)],
])
->union(QsBatch::doesntHave('wiki'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea to add this so that they don't clog up and never get cleared

@m90 m90 merged commit 4c9b5e1 into main Apr 2, 2024
5 checks passed
@m90 m90 deleted the fr/qs-no-wiki branch April 2, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants