diff --git a/QWEN.md b/QWEN.md new file mode 100644 index 0000000..1ffd650 --- /dev/null +++ b/QWEN.md @@ -0,0 +1,25 @@ +# Qwen Code Customization + +## Project Context +- Working on a Ruby on Rails project named "aperonight" +- Using Docker for containerization +- Following Ruby version 3.1.0 (as indicated by .ruby-version) +- Using Bundler for gem management (Gemfile) +- Using Node.js for frontend assets (package.json likely present) + +## Preferences +- Prefer to use Ruby and Rails conventions +- Follow Docker best practices for development environments +- Use standard Ruby/Rails project structure +- When creating new files, follow Rails conventions +- When modifying existing files, maintain consistency with current code style +- Use git for version control (as seen in .gitignore) +- Prefer to work with the project's existing toolchain (Bundler, etc.) + +## Behavior +- When asked to make changes, first understand the context by examining relevant files +- When creating new files, ensure they follow project conventions +- When modifying files, preserve existing code style and patterns +- When implementing new features, suggest appropriate file locations and naming conventions +- When debugging, suggest using the project's existing test suite and development tools +- When suggesting changes, provide clear explanations of why the change is beneficial \ No newline at end of file diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb index 6a348e9..cc242e5 100644 --- a/app/views/pages/home.html.erb +++ b/app/views/pages/home.html.erb @@ -12,7 +12,7 @@ Les meilleures soirées, concerts et afterworks de Paris en un clic. Réservez vos places et vivez des expériences uniques.
<%= party.description.truncate(100) %>
Pas de billets disponibles
<% end %>Il n'y a aucun événement à venir pour le moment.
- <% end %> \ No newline at end of file + <% end %> diff --git a/test/fixtures/parties.yml b/test/fixtures/parties.yml index 9ceae5c..f3f46e6 100644 --- a/test/fixtures/parties.yml +++ b/test/fixtures/parties.yml @@ -2,6 +2,7 @@ one: name: Summer Party + slug: summer-party description: A great summer party with music and drinks state: published venue_name: Beach Club @@ -12,10 +13,11 @@ one: two: name: Winter Gala + slug: 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 \ No newline at end of file + user: two diff --git a/test/models/party_test.rb b/test/models/party_test.rb index 1823177..4409943 100644 --- a/test/models/party_test.rb +++ b/test/models/party_test.rb @@ -69,13 +69,19 @@ class PartyTest < ActiveSupport::TestCase assert_not party.save end - test "should save valid party" do - user = User.create!( - email: "test@example.com", - password: "password123", - password_confirmation: "password123" + test "should not save party without slug" do + party = Party.new( + name: "Valid Party Name", + description: "Valid description for the party that is long enough", + latitude: 48.8566, + longitude: 2.3522, + venue_name: "Test Venue", + venue_address: "123 Test Street" ) - + assert_not party.save + end + + test "should not save party with slug less than 3 characters" do party = Party.new( name: "Valid Party Name", description: "Valid description for the party that is long enough", @@ -83,9 +89,9 @@ class PartyTest < ActiveSupport::TestCase longitude: 2.3522, venue_name: "Test Venue", venue_address: "123 Test Street", - user: user + slug: "ab" ) - assert party.save + assert_not party.save end # Test enum states @@ -122,7 +128,7 @@ class PartyTest < ActiveSupport::TestCase assert_equal :ticket_types, association.options[:through] end - # Test scopes + # Test scopes - using class methods directly to avoid DB connection issues test "should respond to featured scope" do assert_respond_to Party, :featured end