Safer slugs (#135)

* Safer slugs

* fix test case for slug
This commit is contained in:
formsdev
2023-06-19 18:20:31 +05:30
committed by GitHub
parent 5087724847
commit e47dea7936
2 changed files with 7 additions and 2 deletions

View File

@@ -86,7 +86,9 @@ it('can regenerate a form url', function () {
->assertSuccessful()
->assertJson(function (AssertableJson $json) use ($newSlug) {
return $json->where('type', 'success')
->where('form.slug', $newSlug)
->where('form.slug', function ($slug) use ($newSlug) {
return substr($slug, 0, -6) == substr($newSlug, 0, -6);
})
->etc();
});