Merge pull request #8679 from Matt-Yorkley/drop-jquery-ujs

Drop jquery_ujs
This commit is contained in:
Filipe
2022-01-17 16:30:25 +00:00
committed by GitHub
7 changed files with 20 additions and 9 deletions

View File

@@ -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