Skip to content

Improvement : check if competition is sold out#366

Open
Tit-Co wants to merge 12 commits intoOpenClassrooms-Student-Center:masterfrom
Tit-Co:improvement/check-if-competition-is-sold-out
Open

Improvement : check if competition is sold out#366
Tit-Co wants to merge 12 commits intoOpenClassrooms-Student-Center:masterfrom
Tit-Co:improvement/check-if-competition-is-sold-out

Conversation

@Tit-Co
Copy link

@Tit-Co Tit-Co commented Mar 14, 2026

Summary

  • The club should not be able to book if the competition is sold out.

Improvement

server.py

  • Checked if places available is equal to 0 in book route.
  • Returns the welcome template with an error message if the condition fails.
  • This case is already implemented in template and hides the link anchor if the condition is checked, but i secured the route in case of url direct access.

Template

  • Used flash messages in template to inform user.

Unit tests

  • Updated unit tests.
  • Added one more test for this new improvement.

Tit-Co added 12 commits March 9, 2026 18:08
…ase places with not enough points, update unit tests
…ld not be able to book more than 12 places per competition, update unit tests
…ate not reflected, update unit tests with mocks
…d not be able to book more than 12 places per competition, update tests
…aces in past competitions should not be possible, add two more unit tests for that bug fix
…ould not be able to book more than places available, update unit tests
…, add one more unit test for that improvement, update unit tests
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.

1 participant