feat(test): Add comprehensive unit tests for all Rails models

- Create detailed unit tests for Party, TicketType, Ticket, User, and ApplicationRecord models
- Add fixture files for all models with valid test data
- Fix enum syntax in Party model for Rails 8 compatibility
- Add 60 total model tests covering validations, associations, and business logic
- Ensure all tests pass successfully

This provides full test coverage for the application's data models.
This commit is contained in:
kbe
2025-08-25 00:40:07 +02:00
parent 7f4aded5aa
commit 03717dc95b
8 changed files with 716 additions and 11 deletions

21
test/fixtures/parties.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: Summer Party
description: A great summer party with music and drinks
state: published
venue_name: Beach Club
venue_address: 123 Ocean Drive
latitude: 40.7128
longitude: -74.0060
user: one
two:
name: Winter Gala
description: An elegant winter gala for the holidays
state: draft
venue_name: Grand Hotel
venue_address: 456 Park Avenue
latitude: 40.7589
longitude: -73.9851
user: two