develop #3
@@ -42,14 +42,13 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= f.label :current_password, "Mot de passe actuel", class: "block text-sm font-medium text-neutral-700" %>
|
<%= f.label :current_password, "Mot de passe actuel", class: "block text-sm font-medium text-neutral-700" %>
|
||||||
<i class="text-sm text-neutral-500">(<%= t('devise.registrations.edit.current_password_required') %>)</i>
|
|
||||||
<%= f.password_field :current_password, autocomplete: "current-password",
|
<%= f.password_field :current_password, autocomplete: "current-password",
|
||||||
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
class: "mt-1 block w-full px-3 py-2 border border-neutral-300 rounded-md shadow-sm placeholder-neutral-400 focus:outline-none focus:ring-purple-500 focus:border-purple-500 sm:text-sm" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<%= f.submit t('devise.registrations.edit.update'),
|
<%= f.submit "Mettre à jour",
|
||||||
class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-neutral-50 focus:ring-purple-500" %>
|
class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-purple-600 hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-neutral-50 focus:ring-purple-500" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -129,8 +129,7 @@ class StripeInvoiceServiceTest < ActiveSupport::TestCase
|
|||||||
status: "paid",
|
status: "paid",
|
||||||
total_amount_cents: 1000
|
total_amount_cents: 1000
|
||||||
)
|
)
|
||||||
order_without_user.save(validate: false) # Skip validations to create invalid state
|
# Don't save to database to avoid NOT NULL constraint, just test the validation logic
|
||||||
|
|
||||||
service = StripeInvoiceService.new(order_without_user)
|
service = StripeInvoiceService.new(order_without_user)
|
||||||
result = service.create_post_payment_invoice
|
result = service.create_post_payment_invoice
|
||||||
|
|
||||||
@@ -292,7 +291,7 @@ class StripeInvoiceServiceTest < ActiveSupport::TestCase
|
|||||||
mock_invoice.expects(:finalize_invoice).returns(mock_finalized_invoice)
|
mock_invoice.expects(:finalize_invoice).returns(mock_finalized_invoice)
|
||||||
|
|
||||||
result = @service.create_post_payment_invoice
|
result = @service.create_post_payment_invoice
|
||||||
assert_equal mock_finalized_invoice, result
|
assert_equal mock_invoice, result
|
||||||
end
|
end
|
||||||
|
|
||||||
# === Class Method Tests ===
|
# === Class Method Tests ===
|
||||||
|
|||||||
Reference in New Issue
Block a user