Skip to content

Conversation

@artengin
Copy link
Contributor

Added whereNumber('id') validation to all routes with id path parameters to enforce numeric-only values.

@DenTray DenTray changed the title task: Update routes. Closes #130 task: Update routes Jul 26, 2025
@DenTray DenTray requested a review from AZabolotnikov July 26, 2025 08:27

$response->assertNotFound();

$response->assertJson(['error' => 'The route v0.1/users/test could not be found.']);
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not necessary to check the default error messages

Suggested change
$response->assertJson(['error' => 'The route v0.1/users/test could not be found.']);

$this->assertEqualsFixture('get_user', $response->json());
}

public function testGetWrongUrl()
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if delete does not have wereNumber(id)?
Please add tests for delete and put also

Suggested change
public function testGetWrongUrl()
public function testGetIdParamAsString()

@AZabolotnikov AZabolotnikov assigned DenTray and unassigned artengin Aug 4, 2025
@DenTray DenTray merged commit 5fe40f4 into RonasIT:development Aug 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants