fix(test): Slug was missing in ticket tests
This commit is contained in:
@@ -16,6 +16,7 @@ class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -109,6 +110,7 @@ class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -147,6 +149,7 @@ class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -184,6 +187,7 @@ class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -221,6 +225,7 @@ class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
|
||||
@@ -49,7 +49,7 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
|
||||
test "should not save ticket_type without sale_start_at" do
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -60,7 +60,7 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
|
||||
test "should not save ticket_type without sale_end_at" do
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -71,7 +71,7 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
|
||||
test "should not save ticket_type with sale_end_at before sale_start_at" do
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -87,9 +87,10 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
password: "password123",
|
||||
password_confirmation: "password123"
|
||||
)
|
||||
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -97,9 +98,9 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
venue_address: "123 Test Street",
|
||||
user: user
|
||||
)
|
||||
|
||||
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -129,9 +130,10 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
password: "password123",
|
||||
password_confirmation: "password123"
|
||||
)
|
||||
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -139,9 +141,9 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
venue_address: "123 Test Street",
|
||||
user: user
|
||||
)
|
||||
|
||||
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -159,9 +161,10 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
password: "password123",
|
||||
password_confirmation: "password123"
|
||||
)
|
||||
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -169,9 +172,9 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
venue_address: "123 Test Street",
|
||||
user: user
|
||||
)
|
||||
|
||||
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -190,9 +193,10 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
password: "password123",
|
||||
password_confirmation: "password123"
|
||||
)
|
||||
|
||||
|
||||
party = Party.create!(
|
||||
name: "Valid Party Name",
|
||||
name: "Valid Party Name",
|
||||
slug: "valid-party-name",
|
||||
description: "Valid description for the party that is long enough",
|
||||
latitude: 48.8566,
|
||||
longitude: 2.3522,
|
||||
@@ -200,9 +204,9 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
venue_address: "123 Test Street",
|
||||
user: user
|
||||
)
|
||||
|
||||
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -217,7 +221,7 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
|
||||
test "should not save ticket_type with invalid minimum_age" do
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -230,7 +234,7 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
|
||||
test "should not save ticket_type with minimum_age greater than 120" do
|
||||
ticket_type = TicketType.new(
|
||||
name: "Valid Ticket Type Name",
|
||||
name: "Valid Ticket Type Name",
|
||||
description: "Valid description for the ticket type that is long enough",
|
||||
price_cents: 1000,
|
||||
quantity: 50,
|
||||
@@ -240,4 +244,4 @@ class TicketTypeTest < ActiveSupport::TestCase
|
||||
)
|
||||
assert_not ticket_type.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user