mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Merge pull request #8679 from Matt-Yorkley/drop-jquery-ujs
Drop jquery_ujs
This commit is contained in:
@@ -146,7 +146,7 @@ describe Spree::CreditCardsController, type: :controller do
|
||||
expect(controller).to_not receive(:destroy_at_stripe)
|
||||
spree_delete :destroy, params
|
||||
expect(flash[:error]).to eq I18n.t(:card_could_not_be_removed)
|
||||
expect(response).to redirect_to spree.account_path(anchor: 'cards')
|
||||
expect(response.status).to eq 200
|
||||
end
|
||||
end
|
||||
|
||||
@@ -178,7 +178,7 @@ describe Spree::CreditCardsController, type: :controller do
|
||||
it "doesn't delete the card" do
|
||||
expect{ spree_delete :destroy, params }.to_not change(Spree::CreditCard, :count)
|
||||
expect(flash[:error]).to eq I18n.t(:card_could_not_be_removed)
|
||||
expect(response).to redirect_to spree.account_path(anchor: 'cards')
|
||||
expect(response.status).to eq 422
|
||||
end
|
||||
end
|
||||
|
||||
@@ -192,7 +192,7 @@ describe Spree::CreditCardsController, type: :controller do
|
||||
expect{ spree_delete :destroy, params }.to change(Spree::CreditCard, :count).by(-1)
|
||||
expect(flash[:success]).to eq I18n.t(:card_has_been_removed,
|
||||
number: "x-#{card.last_digits}")
|
||||
expect(response).to redirect_to spree.account_path(anchor: 'cards')
|
||||
expect(response.status).to eq 200
|
||||
end
|
||||
|
||||
context "the card is the default card and there are existing authorizations for the user" do
|
||||
|
||||
Reference in New Issue
Block a user