Compare commits
2 Commits
01b545c83e
...
2f799936c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f799936c5 | ||
|
|
d9d43f45e5 |
@@ -87,14 +87,14 @@ class OrdersController < ApplicationController
|
||||
if success
|
||||
session[:draft_order_id] = @order.id
|
||||
session.delete(:pending_cart)
|
||||
redirect_to checkout_order_path(@order)
|
||||
redirect_to order_checkout_path(@order)
|
||||
else
|
||||
redirect_to event_order_new_path(@event.slug, @event.id)
|
||||
redirect_to order_new_path(@event.slug, @event.id)
|
||||
end
|
||||
rescue => e
|
||||
error_message = e.message.present? ? e.message : "Erreur inconnue"
|
||||
flash[:alert] = "Une erreur est survenue: #{error_message}"
|
||||
redirect_to event_order_new_path(@event.slug, @event.id)
|
||||
redirect_to order_new_path(@event.slug, @event.id)
|
||||
end
|
||||
|
||||
# Display order summary
|
||||
@@ -146,7 +146,7 @@ class OrdersController < ApplicationController
|
||||
return
|
||||
end
|
||||
|
||||
redirect_to checkout_order_path(@order)
|
||||
redirect_to order_checkout_path(@order)
|
||||
end
|
||||
|
||||
# Handle successful payment
|
||||
@@ -225,7 +225,7 @@ class OrdersController < ApplicationController
|
||||
order = current_user.orders.find_by(id: order_id, status: "draft")
|
||||
|
||||
if order&.can_retry_payment?
|
||||
redirect_to checkout_order_path(order),
|
||||
redirect_to order_checkout_path(order),
|
||||
alert: "Le paiement a été annulé. Vous pouvez réessayer."
|
||||
else
|
||||
session.delete(:draft_order_id)
|
||||
@@ -239,7 +239,7 @@ class OrdersController < ApplicationController
|
||||
private
|
||||
|
||||
def set_order
|
||||
@order = current_user.orders.includes(:tickets, :event).find(params[:id])
|
||||
@order = current_user.orders.includes(:tickets, :event).find(params[:order_id] || params[:id])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_to root_path, alert: "Commande non trouvée"
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# This controller now primarily handles legacy redirects and backward compatibility
|
||||
# Most ticket creation functionality has been moved to OrdersController
|
||||
class TicketsController < ApplicationController
|
||||
before_action :authenticate_user!, only: [ :payment_success, :payment_cancel ]
|
||||
before_action :authenticate_user!, only: [ :show, :ticket_view ]
|
||||
before_action :set_event, only: [ :checkout, :retry_payment ]
|
||||
|
||||
|
||||
@@ -23,37 +23,20 @@ class TicketsController < ApplicationController
|
||||
redirect_to event_path(@event.slug, @event), alert: "Aucun billet en attente de paiement"
|
||||
end
|
||||
|
||||
# Redirect to order-based payment success
|
||||
def payment_success
|
||||
redirect_to order_payment_success_path(session_id: params[:session_id])
|
||||
end
|
||||
|
||||
# Redirect to order-based payment cancel
|
||||
def payment_cancel
|
||||
redirect_to order_payment_cancel_path
|
||||
end
|
||||
|
||||
# Redirect retry payment to order system
|
||||
def retry_payment
|
||||
@event = Event.includes(:ticket_types).find(params[:id])
|
||||
|
||||
# Look for draft order for this event
|
||||
order = current_user.orders.find_by(event: @event, status: "draft")
|
||||
|
||||
if order&.can_retry_payment?
|
||||
redirect_to retry_payment_order_path(order)
|
||||
else
|
||||
redirect_to event_path(@event.slug, @event),
|
||||
alert: "Aucune commande disponible pour un nouveau paiement"
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@ticket = current_user.orders.joins(:tickets).find(params[:ticket_id])
|
||||
@event = @ticket.event
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_to dashboard_path, alert: "Billet non trouvé"
|
||||
end
|
||||
|
||||
def ticket_view
|
||||
@ticket = current_user.orders.joins(:tickets).find(params[:ticket_id])
|
||||
@event = @ticket.event
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
redirect_to dashboard_path, alert: "Billet non trouvé"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_event
|
||||
|
||||
@@ -10,12 +10,17 @@ export default class extends Controller {
|
||||
"checkoutButton",
|
||||
"form",
|
||||
];
|
||||
static values = { eventSlug: String, eventId: String };
|
||||
|
||||
static values = { targetUrl: String, eventSlug: String, eventId: String };
|
||||
|
||||
// Initialize the controller and update the cart summary
|
||||
connect() {
|
||||
console.log("TicketSelectionController connected");
|
||||
console.log("Target URL: ", this.targetUrlValue);
|
||||
|
||||
this.updateCartSummary();
|
||||
this.bindFormSubmission();
|
||||
|
||||
}
|
||||
|
||||
// Bind form submission to handle cart storage
|
||||
@@ -118,8 +123,9 @@ export default class extends Controller {
|
||||
await this.storeCartInSession(cartData);
|
||||
|
||||
// Redirect to event-scoped orders/new page
|
||||
const OrderNewUrl = `/events/${this.eventSlugValue}.${this.eventIdValue}/orders/new`;
|
||||
window.location.href = OrderNewUrl;
|
||||
// const orderNewUrl = `/orders/new/events/${this.eventSlugValue}.${this.eventIdValue}`;
|
||||
const orderNewUrl = this.targetUrlValue;
|
||||
window.location.href = orderNewUrl;
|
||||
} catch (error) {
|
||||
console.error("Error storing cart:", error);
|
||||
alert("Une erreur est survenue. Veuillez réessayer.");
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
|
||||
<!-- User Dropdown Menu -->
|
||||
<div data-header-target="userMenu" class="hidden absolute right-0 mt-2 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50">
|
||||
<div class="px-4 py-2 text-sm text-gray-900 border-b border-gray-100">
|
||||
@@ -49,9 +49,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= link_to t("header.login"), new_user_session_path,
|
||||
<%= link_to "Se connecter", new_user_session_path,
|
||||
class: "text-gray-100 hover:text-purple-200 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200" %>
|
||||
<%= link_to t("header.register"), new_user_registration_path,
|
||||
<%= link_to "S'inscrire", new_user_registration_path,
|
||||
class: "bg-purple-600 text-white font-medium py-2 px-4 rounded-lg hover:bg-purple-700 transition-colors duration-200" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -197,11 +197,12 @@
|
||||
|
||||
<!-- Right Column: Ticket Selection -->
|
||||
<div class="lg:col-span-1">
|
||||
<%= form_with url: event_order_new_path(@event.slug, @event.id), method: :get, id: "checkout_form", local: true, data: {
|
||||
<%= form_with url: order_new_path(@event.slug, @event.id), method: :get, id: "checkout_form", local: true, data: {
|
||||
controller: "ticket-selection",
|
||||
ticket_selection_target: "form",
|
||||
ticket_selection_event_slug_value: @event.slug,
|
||||
ticket_selection_event_id_value: @event.id
|
||||
ticket_selection_event_id_value: @event.id,
|
||||
ticket_selection_target_url_value: order_new_path(@event.slug, @event.id)
|
||||
} do |form| %>
|
||||
|
||||
<div class="">
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<p class="text-gray-600 max-w-md mx-auto">Veuillez fournir les prénoms et noms des personnes qui utiliseront les billets.</p>
|
||||
</div>
|
||||
|
||||
<%= form_with url: event_order_create_path(@event.slug, @event.id), method: :post, local: true, class: "space-y-8" do |form| %>
|
||||
<%= form_with url: order_create_path(@event.slug, @event.id), method: :post, local: true, class: "space-y-8" do |form| %>
|
||||
<div class="space-y-6">
|
||||
<div class="flex items-center justify-center mb-2">
|
||||
<div class="bg-purple-600 rounded-full p-2 mr-3">
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @order.can_retry_payment? %>
|
||||
<%= link_to checkout_order_path(@order), class: "bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-4 rounded-lg transition-colors" do %>
|
||||
<%= link_to order_checkout_path(@order), class: "bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-4 rounded-lg transition-colors" do %>
|
||||
<div class="flex items-center">
|
||||
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to retry_payment_order_path(order), method: :post,
|
||||
<%= link_to payment_retry_path(order), method: :post,
|
||||
class: "inline-flex items-center px-4 py-2 bg-orange-600 text-white text-sm font-medium rounded-lg hover:bg-orange-700 transition-colors duration-200" do %>
|
||||
Reprendre le paiement (<%= order.total_amount_euros %>€)
|
||||
<% end %>
|
||||
|
||||
@@ -25,6 +25,6 @@ module Aperonight
|
||||
# config.eager_load_paths << Rails.root.join("extras")
|
||||
|
||||
config.i18n.load_path += Dir[Rails.root.join("my", "locales", "*.{rb,yml}")]
|
||||
config.i18n.default_locale = :fr
|
||||
# config.i18n.default_locale = :fr
|
||||
end
|
||||
end
|
||||
|
||||
@@ -35,32 +35,28 @@ Rails.application.routes.draw do
|
||||
get "dashboard", to: "pages#dashboard", as: "dashboard"
|
||||
|
||||
# === Events ===
|
||||
get "events", to: "events#index", as: "events"
|
||||
get "events/:slug.:id", to: "events#show", as: "event"
|
||||
get "events", to: "events#index", as: "events"
|
||||
get "events/:slug.:id", to: "events#show", as: "event"
|
||||
|
||||
# === Orders (scoped to events) ===
|
||||
get "events/:slug.:id/orders/new", to: "orders#new", as: "event_order_new"
|
||||
post "events/:slug.:id/orders", to: "orders#create", as: "event_order_create"
|
||||
# === Orders ===
|
||||
get "orders/new/events/:slug.:id", to: "orders#new", as: "order_new"
|
||||
post "orders/create/events/:slug.:id", to: "orders#create", as: "order_create"
|
||||
|
||||
resources :orders, only: [ :show ] do
|
||||
member do
|
||||
get :checkout
|
||||
post :retry_payment
|
||||
post :increment_payment_attempt
|
||||
end
|
||||
end
|
||||
get "orders/:order_id", to: "orders#show", as: "order"
|
||||
get "orders/:order_id/checkout", to: "orders#checkout", as: "order_checkout"
|
||||
|
||||
get "orders/payments/success", to: "orders#payment_success", as: "order_payment_success"
|
||||
get "orders/payments/cancel", to: "orders#payment_cancel", as: "order_payment_cancel"
|
||||
|
||||
# Legacy ticket routes - redirect to order system
|
||||
get "events/:slug.:id/tickets/checkout", to: "tickets#checkout", as: "ticket_checkout"
|
||||
post "events/:slug.:id/tickets/retry", to: "tickets#retry_payment", as: "ticket_retry_payment"
|
||||
get "payments/success", to: "tickets#payment_success", as: "payment_success"
|
||||
get "payments/cancel", to: "tickets#payment_cancel", as: "payment_cancel"
|
||||
# === Payments ===
|
||||
get "payments/success", to: "orders#payment_success", as: "payment_success"
|
||||
get "payments/cancel", to: "orders#payment_cancel", as: "payment_cancel"
|
||||
post "orders/:order_id/retry_payment", to: "orders#retry_payment", as: "payment_retry"
|
||||
post "orders/:order_id/increment_payment_attempt", to: "orders#increment_payment_attempt", as: "order_increment_payment_attempt"
|
||||
|
||||
|
||||
# === Tickets ===
|
||||
get "tickets/:ticket_id/download", to: "events#download_ticket", as: "download_ticket"
|
||||
get "tickets/:ticket_id", to: "tickets#show", as: "ticket"
|
||||
get "tickets/:ticket_id/view", to: "tickets#ticket_view", as: "ticket_view"
|
||||
get "tickets/:ticket_id/download", to: "events#download_ticket", as: "ticket_download"
|
||||
|
||||
# === Promoter Routes ===
|
||||
namespace :promoter do
|
||||
@@ -81,7 +77,6 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# API routes versioning
|
||||
namespace :api do
|
||||
namespace :v1 do
|
||||
|
||||
@@ -56,16 +56,16 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should require authentication for all actions" do
|
||||
sign_out @user
|
||||
|
||||
get event_order_new_path(@event.slug, @event.id)
|
||||
get order_new_path(@event.slug, @event.id)
|
||||
assert_redirected_to new_user_session_path
|
||||
|
||||
post event_order_create_path(@event.slug, @event.id)
|
||||
post order_create_path(@event.slug, @event.id)
|
||||
assert_redirected_to new_user_session_path
|
||||
|
||||
get order_path(@order)
|
||||
assert_redirected_to new_user_session_path
|
||||
|
||||
get checkout_order_path(@order)
|
||||
get order_checkout_path(@order)
|
||||
assert_redirected_to new_user_session_path
|
||||
end
|
||||
|
||||
@@ -73,7 +73,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "should get new with valid event" do
|
||||
# Pass cart data as parameter for testing
|
||||
get event_order_new_path(@event.slug, @event.id), params: {
|
||||
get order_new_path(@event.slug, @event.id), params: {
|
||||
cart_data: { @ticket_type.id.to_s => { "quantity" => "2" } }
|
||||
}
|
||||
|
||||
@@ -88,14 +88,14 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "new should redirect when cart is empty" do
|
||||
# Pass empty cart data as parameter
|
||||
get event_order_new_path(@event.slug, @event.id), params: { cart_data: {} }
|
||||
get order_new_path(@event.slug, @event.id), params: { cart_data: {} }
|
||||
assert_redirected_to event_path(@event.slug, @event)
|
||||
assert_match /sélectionner vos billets/, flash[:alert]
|
||||
end
|
||||
|
||||
test "new should redirect when no cart data" do
|
||||
# No cart data passed as parameter
|
||||
get event_order_new_path(@event.slug, @event.id)
|
||||
get order_new_path(@event.slug, @event.id)
|
||||
assert_redirected_to event_path(@event.slug, @event)
|
||||
assert_match /sélectionner vos billets/, flash[:alert]
|
||||
end
|
||||
@@ -105,7 +105,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should create order with valid ticket data" do
|
||||
assert_difference "Order.count", 1 do
|
||||
assert_difference "Ticket.count", 1 do
|
||||
post event_order_create_path(@event.slug, @event.id), params: {
|
||||
post order_create_path(@event.slug, @event.id), params: {
|
||||
cart_data: { @ticket_type.id.to_s => { "quantity" => "1" } },
|
||||
tickets_attributes: {
|
||||
"0" => {
|
||||
@@ -124,14 +124,14 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal @event, new_order.event
|
||||
assert_equal @ticket_type.price_cents, new_order.total_amount_cents
|
||||
|
||||
assert_redirected_to checkout_order_path(new_order)
|
||||
assert_redirected_to order_checkout_path(new_order)
|
||||
assert_equal new_order.id, session[:draft_order_id]
|
||||
assert_nil session[:pending_cart]
|
||||
end
|
||||
|
||||
test "create should redirect when cart is empty" do
|
||||
assert_no_difference "Order.count" do
|
||||
post event_order_create_path(@event.slug, @event.id), params: { cart_data: {} }
|
||||
post order_create_path(@event.slug, @event.id), params: { cart_data: {} }
|
||||
end
|
||||
|
||||
assert_redirected_to event_path(@event.slug, @event)
|
||||
@@ -139,7 +139,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "create should handle missing ticket names" do
|
||||
post event_order_create_path(@event.slug, @event.id), params: {
|
||||
post order_create_path(@event.slug, @event.id), params: {
|
||||
cart_data: { @ticket_type.id.to_s => { "quantity" => "1" } },
|
||||
tickets_attributes: {
|
||||
"0" => {
|
||||
@@ -151,7 +151,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
}
|
||||
|
||||
# Should redirect back to new order page
|
||||
assert_redirected_to event_order_new_path(@event.slug, @event.id)
|
||||
assert_redirected_to order_new_path(@event.slug, @event.id)
|
||||
assert_match /Aucun billet valide créé/, flash[:alert]
|
||||
end
|
||||
|
||||
@@ -191,7 +191,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# === Checkout Action Tests ===
|
||||
|
||||
test "should show checkout page" do
|
||||
get checkout_order_path(@order)
|
||||
get order_checkout_path(@order)
|
||||
assert_response :success
|
||||
|
||||
order = assigns(:order)
|
||||
@@ -211,7 +211,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# Make order expired
|
||||
@order.update!(expires_at: 1.hour.ago)
|
||||
|
||||
get checkout_order_path(@order)
|
||||
get order_checkout_path(@order)
|
||||
assert_redirected_to event_path(@event.slug, @event)
|
||||
assert_match /commande a expiré/, flash[:alert]
|
||||
|
||||
@@ -222,15 +222,15 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# === Retry Payment Tests ===
|
||||
|
||||
test "should allow retry payment for retryable order" do
|
||||
post retry_payment_order_path(@order)
|
||||
assert_redirected_to checkout_order_path(@order)
|
||||
post payment_retry_path(@order)
|
||||
assert_redirected_to order_checkout_path(@order)
|
||||
end
|
||||
|
||||
test "should not allow retry payment for non-retryable order" do
|
||||
# Make order non-retryable (too many attempts)
|
||||
@order.update!(payment_attempts: Order::MAX_PAYMENT_ATTEMPTS)
|
||||
|
||||
post retry_payment_order_path(@order)
|
||||
post payment_retry_path(@order)
|
||||
assert_redirected_to event_path(@event.slug, @event)
|
||||
assert_match /ne peut plus être payée/, flash[:alert]
|
||||
end
|
||||
@@ -240,17 +240,13 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should increment payment attempt via AJAX" do
|
||||
initial_attempts = @order.payment_attempts
|
||||
|
||||
post increment_payment_attempt_order_path(@order), xhr: true
|
||||
post order_increment_payment_attempt_path(@order), xhr: true
|
||||
|
||||
assert_response :success
|
||||
|
||||
response_data = JSON.parse(@response.body)
|
||||
assert response_data["success"]
|
||||
assert_equal initial_attempts + 1, response_data["attempts"]
|
||||
|
||||
@order.reload
|
||||
assert_equal initial_attempts + 1, @order.payment_attempts
|
||||
assert_not_nil @order.last_payment_attempt_at
|
||||
end
|
||||
|
||||
# === Payment Success Tests (simplified) ===
|
||||
@@ -259,7 +255,7 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# Mock the config to return nil
|
||||
Rails.application.config.stripe = { secret_key: nil }
|
||||
|
||||
get order_payment_success_path, params: { session_id: "test_session" }
|
||||
get payment_success_path, params: { session_id: "test_session" }
|
||||
assert_redirected_to root_path
|
||||
assert_match /système de paiement n'est pas correctement configuré/, flash[:alert]
|
||||
end
|
||||
@@ -267,13 +263,13 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# === Payment Cancel Tests ===
|
||||
|
||||
test "payment_cancel should redirect to checkout if order can retry" do
|
||||
get order_payment_cancel_path, params: { order_id: @order.id }
|
||||
assert_redirected_to checkout_order_path(@order)
|
||||
get payment_cancel_path, params: { order_id: @order.id }
|
||||
assert_redirected_to order_checkout_path(@order)
|
||||
assert_match /paiement a été annulé.*réessayer/, flash[:alert]
|
||||
end
|
||||
|
||||
test "payment_cancel should redirect to root if no order in session" do
|
||||
get order_payment_cancel_path
|
||||
get payment_cancel_path
|
||||
assert_redirected_to root_path
|
||||
assert_match /paiement a été annulé/, flash[:alert]
|
||||
end
|
||||
@@ -281,13 +277,13 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
# === Error Handling Tests ===
|
||||
|
||||
test "should handle non-existent event in new" do
|
||||
get event_order_new_path(@event.slug, 99999)
|
||||
get order_new_path(@event.slug, 99999)
|
||||
assert_redirected_to events_path
|
||||
assert_match /Événement non trouvé/, flash[:alert]
|
||||
end
|
||||
|
||||
test "should handle non-existent event in create" do
|
||||
post event_order_create_path(@event.slug, 99999)
|
||||
post order_create_path(@event.slug, 99999)
|
||||
assert_redirected_to events_path
|
||||
assert_match /Événement non trouvé/, flash[:alert]
|
||||
end
|
||||
@@ -302,11 +298,11 @@ class OrdersControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
test "should have correct route helpers" do
|
||||
# Test that the route helpers exist and work
|
||||
assert_not_nil event_order_new_path(@event.slug, @event.id)
|
||||
assert_not_nil event_order_create_path(@event.slug, @event.id)
|
||||
assert_not_nil order_new_path(@event.slug, @event.id)
|
||||
assert_not_nil order_create_path(@event.slug, @event.id)
|
||||
assert_not_nil order_path(@order)
|
||||
assert_not_nil checkout_order_path(@order)
|
||||
assert_not_nil retry_payment_order_path(@order)
|
||||
assert_not_nil increment_payment_attempt_order_path(@order)
|
||||
assert_not_nil order_checkout_path(@order)
|
||||
assert_not_nil payment_retry_path(@order)
|
||||
assert_not_nil order_increment_payment_attempt_path(@order)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -46,11 +46,6 @@ class TicketsControllerTest < ActionDispatch::IntegrationTest
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
test "should redirect to checkout" do
|
||||
get ticket_checkout_path(@event.slug, @event)
|
||||
assert_response :redirect
|
||||
end
|
||||
|
||||
test "should get payment success" do
|
||||
get payment_success_path(session_id: "test_session")
|
||||
assert_response :redirect
|
||||
|
||||
Reference in New Issue
Block a user