-
Prêt à vivre la nuit parisienne ?
-
Rejoignez des milliers de party-goers qui utilisent Aperonight chaque semaine
- <%= link_to new_user_registration_path, class: "bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 text-white font-semibold py-4 px-8 rounded-full text-lg transition-all duration-300 transform hover:scale-105 shadow-xl" do %>
- S'inscrire gratuitement
- <% end %>
+
+
+
+
Ready to Join the Community?
+
Start discovering amazing events and connect with like-minded professionals in your city.
+
+
+
+ Join Now - Free
+
+
+
+ Browse Events
+
+
+
-
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index fd919e7..f25808a 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -15,10 +15,10 @@ Rails.application.routes.draw do
# Pages
get "dashboard", to: "pages#dashboard", as: "dashboard"
- # Parties
- get "parties", to: "parties#index", as: "parties"
- get "parties/:slug.:id", to: "parties#show", as: "party"
- post "parties/:slug.:id/checkout", to: "parties#checkout", as: "party_checkout"
+ # events
+ get "events", to: "events#index", as: "events"
+ get "events/:slug.:id", to: "events#show", as: "party"
+ post "events/:slug.:id/checkout", to: "events#checkout", as: "party_checkout"
# Routes for devise authentication Gem
# Bind devise to user
@@ -42,8 +42,8 @@ Rails.application.routes.draw do
# API routes versioning
namespace :api do
namespace :v1 do
- # RESTful routes for party management
- resources :parties, only: [ :index, :show, :create, :update, :destroy ]
+ # RESTful routes for event management
+ resources :events, only: [ :index, :show, :create, :update, :destroy ]
# resources :bundles, only: [ :index, :show, :create, :update, :destroy ]
diff --git a/db/migrate/20250823145902_create_parties.rb b/db/migrate/20250823145902_create_events.rb
similarity index 75%
rename from db/migrate/20250823145902_create_parties.rb
rename to db/migrate/20250823145902_create_events.rb
index 39e100e..e0cca4f 100755
--- a/db/migrate/20250823145902_create_parties.rb
+++ b/db/migrate/20250823145902_create_events.rb
@@ -1,6 +1,6 @@
-class CreateParties < ActiveRecord::Migration[8.0]
+class CreateEvents < ActiveRecord::Migration[8.0]
def change
- create_table :parties do |t|
+ create_table :events do |t|
t.string :name, null: false
t.string :slug, null: false
t.string :image, null: true
@@ -18,8 +18,8 @@ class CreateParties < ActiveRecord::Migration[8.0]
t.timestamps
end
- add_index :parties, :state
- add_index :parties, :featured
- add_index :parties, [ :latitude, :longitude ]
+ add_index :events, :state
+ add_index :events, :featured
+ add_index :events, [ :latitude, :longitude ]
end
end
diff --git a/db/migrate/20250823170408_create_ticket_types.rb b/db/migrate/20250823170408_create_ticket_types.rb
index 53ace43..d08f0a7 100755
--- a/db/migrate/20250823170408_create_ticket_types.rb
+++ b/db/migrate/20250823170408_create_ticket_types.rb
@@ -9,12 +9,12 @@ class CreateTicketTypes < ActiveRecord::Migration[8.0]
t.datetime :sale_end_at
t.boolean :requires_id
t.integer :minimum_age
- t.references :party, null: false, foreign_key: false
+ t.references :event, null: false, foreign_key: false
t.timestamps
end
- add_index :ticket_types, :party_id unless index_exists?(:ticket_types, :party_id)
+ add_index :ticket_types, :event_id unless index_exists?(:ticket_types, :event_id)
add_index :ticket_types, :sale_start_at unless index_exists?(:ticket_types, :sale_start_at)
add_index :ticket_types, :sale_end_at unless index_exists?(:ticket_types, :sale_end_at)
end
diff --git a/db/schema.rb b/db/schema.rb
index 9f42cd7..ffe6170 100755
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
- create_table "parties", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
+ create_table "events", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
t.string "name", null: false
t.string "slug", null: false
t.string "image"
@@ -27,10 +27,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
t.bigint "user_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["featured"], name: "index_parties_on_featured"
- t.index ["latitude", "longitude"], name: "index_parties_on_latitude_and_longitude"
- t.index ["state"], name: "index_parties_on_state"
- t.index ["user_id"], name: "index_parties_on_user_id"
+ t.index ["featured"], name: "index_events_on_featured"
+ t.index ["latitude", "longitude"], name: "index_events_on_latitude_and_longitude"
+ t.index ["state"], name: "index_events_on_state"
+ t.index ["user_id"], name: "index_events_on_user_id"
end
create_table "ticket_types", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
@@ -42,10 +42,10 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
t.datetime "sale_end_at"
t.boolean "requires_id"
t.integer "minimum_age"
- t.bigint "party_id", null: false
+ t.bigint "event_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
- t.index ["party_id"], name: "index_ticket_types_on_party_id"
+ t.index ["event_id"], name: "index_ticket_types_on_event_id"
t.index ["sale_end_at"], name: "index_ticket_types_on_sale_end_at"
t.index ["sale_start_at"], name: "index_ticket_types_on_sale_start_at"
end
diff --git a/docs/architecture.md b/docs/architecture.md
index cac7273..1000d3b 100755
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -2,7 +2,7 @@
## Overview
-Aperonight is a Ruby on Rails web application designed for proposing night parties in Paris and allowing party makers to create their own events. The application serves two primary user groups:
+Aperonight is a Ruby on Rails web application designed for proposing night parties in Paris and allowing event makers to create their own events. The application serves two primary user groups:
### For Customers:
- View upcoming and past parties
@@ -30,8 +30,8 @@ create_table :users do |t|
t.timestamps
end
-# Party - Events created by promoters
-create_table :parties do |t|
+# Event - Events created by promoters
+create_table :events do |t|
t.string :name
t.text :description
t.datetime :start_time
@@ -46,7 +46,7 @@ create_table :ticket_types do |t|
t.string :name
t.text :description
t.decimal :price
- t.integer :party_id
+ t.integer :event_id
t.timestamps
end
@@ -54,7 +54,7 @@ end
create_table :tickets do |t|
t.string :uuid
t.string :qr_code
- t.integer :party_id
+ t.integer :event_id
t.integer :user_id
t.integer :ticket_type_id
t.boolean :used, default: false
@@ -83,19 +83,19 @@ class User < ApplicationRecord
has_many :parties, foreign_key: 'promoter_id'
end
-class Party < ApplicationRecord
+class Event < ApplicationRecord
belongs_to :promoter, class_name: 'User'
has_many :tickets
has_many :ticket_types
end
class TicketType < ApplicationRecord
- belongs_to :party
+ belongs_to :event
has_many :tickets
end
class Ticket < ApplicationRecord
- belongs_to :party
+ belongs_to :event
belongs_to :user
belongs_to :ticket_type
has_one :payment
@@ -143,25 +143,25 @@ end
```ruby
class PartiesController < ApplicationController
before_action :authenticate_user!
- before_action :set_party, only: [:show, :edit, :update, :destroy]
+ before_action :set_event, only: [:show, :edit, :update, :destroy]
def index
- @parties = Party.all
+ @parties = Event.all
end
def show
- @ticket_types = @party.ticket_types
+ @ticket_types = @event.ticket_types
end
def new
- @party = Party.new
- @party.ticket_types.build
+ @event = Event.new
+ @event.ticket_types.build
end
def create
- @party = current_user.parties.build(party_params)
- if @party.save
- redirect_to @party, notice: 'Party was successfully created.'
+ @event = current_user.parties.build(event_params)
+ if @event.save
+ redirect_to @event, notice: 'Event was successfully created.'
else
render :new
end
@@ -169,12 +169,12 @@ class PartiesController < ApplicationController
private
- def set_party
- @party = Party.find(params[:id])
+ def set_event
+ @event = Event.find(params[:id])
end
- def party_params
- params.require(:party).permit(
+ def event_params
+ params.require(:event).permit(
:name, :description, :start_time, :end_time, :location,
ticket_types_attributes: [:id, :name, :description, :price, :_destroy]
)
@@ -186,7 +186,7 @@ end
```ruby
class TicketsController < ApplicationController
before_action :authenticate_user!
- before_action :set_party, only: [:new, :create]
+ before_action :set_event, only: [:new, :create]
def new
@ticket = Ticket.new
@@ -217,12 +217,12 @@ class TicketsController < ApplicationController
private
- def set_party
- @party = Party.find(params[:party_id])
+ def set_event
+ @event = Event.find(params[:event_id])
end
def ticket_params
- params.require(:ticket).permit(:ticket_type_id, :party_id)
+ params.require(:ticket).permit(:ticket_type_id, :event_id)
end
end
```
diff --git a/test.txt b/test.txt
new file mode 100755
index 0000000..e69de29
diff --git a/test/fixtures/parties.yml b/test/fixtures/events.yml
similarity index 82%
rename from test/fixtures/parties.yml
rename to test/fixtures/events.yml
index f3f46e6..e2fb610 100755
--- a/test/fixtures/parties.yml
+++ b/test/fixtures/events.yml
@@ -1,9 +1,9 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
- name: Summer Party
- slug: summer-party
- description: A great summer party with music and drinks
+ name: Summer Event
+ slug: summer-event
+ description: A great summer event with music and drinks
state: published
venue_name: Beach Club
venue_address: 123 Ocean Drive
diff --git a/test/fixtures/ticket_types.yml b/test/fixtures/ticket_types.yml
index 09691d9..6ee6b33 100755
--- a/test/fixtures/ticket_types.yml
+++ b/test/fixtures/ticket_types.yml
@@ -7,7 +7,7 @@ one:
quantity: 100
sale_start_at: <%= 1.day.ago %>
sale_end_at: <%= 1.day.from_now %>
- party: one
+ event: one
two:
name: VIP Access
@@ -16,4 +16,4 @@ two:
quantity: 50
sale_start_at: <%= 1.day.ago %>
sale_end_at: <%= 1.day.from_now %>
- party: two
\ No newline at end of file
+ event: two
\ No newline at end of file
diff --git a/test/models/event_test.rb b/test/models/event_test.rb
new file mode 100755
index 0000000..824c1ae
--- /dev/null
+++ b/test/models/event_test.rb
@@ -0,0 +1,163 @@
+require "test_helper"
+
+class EventTest < ActiveSupport::TestCase
+ # Test that Event model exists
+ test "should be a class" do
+ assert_kind_of Class, Event
+ end
+
+ # Test validations
+ test "should not save event without name" do
+ event = Event.new(description: "Test event description")
+ assert_not event.save
+ end
+
+ test "should not save event without description" do
+ event = Event.new(name: "Test Event")
+ assert_not event.save
+ end
+
+ test "should not save event with name less than 3 characters" do
+ event = Event.new(name: "AB", description: "Valid description for the event")
+ assert_not event.save
+ end
+
+ test "should not save event with description less than 10 characters" do
+ event = Event.new(name: "Valid Event Name", description: "Too short")
+ assert_not event.save
+ end
+
+ test "should not save event without latitude" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ longitude: 2.3522
+ )
+ assert_not event.save
+ end
+
+ test "should not save event without longitude" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566
+ )
+ assert_not event.save
+ end
+
+ test "should not save event with invalid latitude" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 95.0,
+ longitude: 2.3522,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street"
+ )
+ assert_not event.save
+ end
+
+ test "should not save event with invalid longitude" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566,
+ longitude: 190.0,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street"
+ )
+ assert_not event.save
+ end
+
+ test "should not save event without slug" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566,
+ longitude: 2.3522,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street"
+ )
+ assert_not event.save
+ end
+
+ test "should not save event with slug less than 3 characters" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566,
+ longitude: 2.3522,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street",
+ slug: "ab"
+ )
+ assert_not event.save
+ end
+
+ test "should save valid event" do
+ user = User.create!(
+ email: "test@example.com",
+ password: "password123",
+ password_confirmation: "password123"
+ )
+
+ event = Event.new(
+ name: "Valid Event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566,
+ longitude: 2.3522,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street",
+ user: user,
+ )
+ assert event.save
+ end
+
+ # Test enum states
+ test "should have valid states" do
+ assert_equal %w[draft published canceled sold_out], Event.states.keys
+ end
+
+ test "should default to draft state" do
+ event = Event.new(
+ name: "Valid Event Name",
+ description: "Valid description for the event that is long enough",
+ latitude: 48.8566,
+ longitude: 2.3522,
+ venue_name: "Test Venue",
+ venue_address: "123 Test Street"
+ )
+ assert_equal "draft", event.state
+ end
+
+ # Test associations
+ test "should belong to user" do
+ association = Event.reflect_on_association(:user)
+ assert_equal :belongs_to, association.macro
+ end
+
+ test "should have many ticket_types" do
+ association = Event.reflect_on_association(:ticket_types)
+ assert_equal :has_many, association.macro
+ end
+
+ test "should have many tickets through ticket_types" do
+ association = Event.reflect_on_association(:tickets)
+ assert_equal :has_many, association.macro
+ assert_equal :ticket_types, association.options[:through]
+ end
+
+ # Test scopes
+ test "should respond to featured scope" do
+ assert_respond_to Event, :featured
+ end
+
+ test "should respond to published scope" do
+ assert_respond_to Event, :published
+ end
+
+ test "should respond to search_by_name scope" do
+ assert_respond_to Event, :search_by_name
+ end
+end
diff --git a/test/models/party_test.rb b/test/models/party_test.rb
deleted file mode 100755
index b989051..0000000
--- a/test/models/party_test.rb
+++ /dev/null
@@ -1,163 +0,0 @@
-require "test_helper"
-
-class PartyTest < ActiveSupport::TestCase
- # Test that Party model exists
- test "should be a class" do
- assert_kind_of Class, Party
- end
-
- # Test validations
- test "should not save party without name" do
- party = Party.new(description: "Test party description")
- assert_not party.save
- end
-
- test "should not save party without description" do
- party = Party.new(name: "Test Party")
- assert_not party.save
- end
-
- test "should not save party with name less than 3 characters" do
- party = Party.new(name: "AB", description: "Valid description for the party")
- assert_not party.save
- end
-
- test "should not save party with description less than 10 characters" do
- party = Party.new(name: "Valid Party Name", description: "Too short")
- assert_not party.save
- end
-
- test "should not save party without latitude" do
- party = Party.new(
- name: "Valid Party Name",
- description: "Valid description for the party that is long enough",
- longitude: 2.3522
- )
- assert_not party.save
- end
-
- test "should not save party without longitude" do
- party = Party.new(
- name: "Valid Party Name",
- description: "Valid description for the party that is long enough",
- latitude: 48.8566
- )
- assert_not party.save
- end
-
- test "should not save party with invalid latitude" do
- party = Party.new(
- name: "Valid Party Name",
- description: "Valid description for the party that is long enough",
- latitude: 95.0,
- longitude: 2.3522,
- venue_name: "Test Venue",
- venue_address: "123 Test Street"
- )
- assert_not party.save
- end
-
- test "should not save party with invalid longitude" do
- party = Party.new(
- name: "Valid Party Name",
- description: "Valid description for the party that is long enough",
- latitude: 48.8566,
- longitude: 190.0,
- venue_name: "Test Venue",
- venue_address: "123 Test Street"
- )
- assert_not party.save
- end
-
- 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",
- latitude: 48.8566,
- longitude: 2.3522,
- venue_name: "Test Venue",
- venue_address: "123 Test Street",
- slug: "ab"
- )
- assert_not party.save
- end
-
- test "should save valid party" do
- user = User.create!(
- email: "test@example.com",
- password: "password123",
- password_confirmation: "password123"
- )
-
- party = Party.new(
- name: "Valid Party Name",
- slug: "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",
- user: user,
- )
- assert party.save
- end
-
- # Test enum states
- test "should have valid states" do
- assert_equal %w[draft published canceled sold_out], Party.states.keys
- end
-
- test "should default to draft state" 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_equal "draft", party.state
- end
-
- # Test associations
- test "should belong to user" do
- association = Party.reflect_on_association(:user)
- assert_equal :belongs_to, association.macro
- end
-
- test "should have many ticket_types" do
- association = Party.reflect_on_association(:ticket_types)
- assert_equal :has_many, association.macro
- end
-
- test "should have many tickets through ticket_types" do
- association = Party.reflect_on_association(:tickets)
- assert_equal :has_many, association.macro
- assert_equal :ticket_types, association.options[:through]
- end
-
- # Test scopes
- test "should respond to featured scope" do
- assert_respond_to Party, :featured
- end
-
- test "should respond to published scope" do
- assert_respond_to Party, :published
- end
-
- test "should respond to search_by_name scope" do
- assert_respond_to Party, :search_by_name
- end
-end
diff --git a/test/models/ticket_test.rb b/test/models/ticket_test.rb
index d262d39..86f986a 100755
--- a/test/models/ticket_test.rb
+++ b/test/models/ticket_test.rb
@@ -14,10 +14,10 @@ class TicketTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -33,7 +33,7 @@ class TicketTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
ticket = Ticket.new(user: user, ticket_type: ticket_type)
@@ -87,8 +87,8 @@ class TicketTest < ActiveSupport::TestCase
assert_equal :belongs_to, association.macro
end
- test "should have one party through ticket_type" do
- association = Ticket.reflect_on_association(:party)
+ test "should have one event through ticket_type" do
+ association = Ticket.reflect_on_association(:event)
assert_equal :has_one, association.macro
assert_equal :ticket_type, association.options[:through]
end
@@ -108,10 +108,10 @@ class TicketTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -127,7 +127,7 @@ class TicketTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
ticket = Ticket.new(
@@ -147,10 +147,10 @@ class TicketTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -166,7 +166,7 @@ class TicketTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
ticket = Ticket.new(
@@ -185,10 +185,10 @@ class TicketTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -204,7 +204,7 @@ class TicketTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
ticket = Ticket.new(
@@ -223,10 +223,10 @@ class TicketTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -242,7 +242,7 @@ class TicketTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
ticket = Ticket.new(
diff --git a/test/models/ticket_type_test.rb b/test/models/ticket_type_test.rb
index c09cd09..3aea6b0 100755
--- a/test/models/ticket_type_test.rb
+++ b/test/models/ticket_type_test.rb
@@ -88,10 +88,10 @@ class TicketTypeTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -107,14 +107,14 @@ class TicketTypeTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
assert ticket_type.save
end
# Test associations
- test "should belong to party" do
- association = TicketType.reflect_on_association(:party)
+ test "should belong to event" do
+ association = TicketType.reflect_on_association(:event)
assert_equal :belongs_to, association.macro
end
@@ -131,10 +131,10 @@ class TicketTypeTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -150,7 +150,7 @@ class TicketTypeTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: true,
- party: party
+ event: event
)
assert ticket_type.save
end
@@ -162,10 +162,10 @@ class TicketTypeTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -181,7 +181,7 @@ class TicketTypeTest < ActiveSupport::TestCase
sale_start_at: Time.current,
sale_end_at: Time.current + 1.day,
requires_id: false,
- party: party
+ event: event
)
assert ticket_type.save
end
@@ -194,10 +194,10 @@ class TicketTypeTest < ActiveSupport::TestCase
password_confirmation: "password123"
)
- party = Party.create!(
- name: "Valid Party Name",
- slug: "valid-party-name",
- description: "Valid description for the party that is long enough",
+ event = Event.create!(
+ name: "Valid event Name",
+ slug: "valid-event-name",
+ description: "Valid description for the event that is long enough",
latitude: 48.8566,
longitude: 2.3522,
venue_name: "Test Venue",
@@ -214,7 +214,7 @@ class TicketTypeTest < ActiveSupport::TestCase
sale_end_at: Time.current + 1.day,
requires_id: false,
minimum_age: nil,
- party: party
+ event: event
)
assert ticket_type.save
end
diff --git a/test/models/user_test.rb b/test/models/user_test.rb
index 48b362e..b2f7ce5 100755
--- a/test/models/user_test.rb
+++ b/test/models/user_test.rb
@@ -14,8 +14,8 @@ class UserTest < ActiveSupport::TestCase
end
# Test associations
- test "should have many parties" do
- association = User.reflect_on_association(:parties)
+ test "should have many events" do
+ association = User.reflect_on_association(:events)
assert_equal :has_many, association.macro
assert_equal :destroy, association.options[:dependent]
end