mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Fix rspec syntax
This commit is contained in:
@@ -21,7 +21,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
end
|
||||
|
||||
it "responds with a 400" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 400
|
||||
end
|
||||
end
|
||||
@@ -32,7 +32,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
end
|
||||
|
||||
it "responds with a 401" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 401
|
||||
end
|
||||
end
|
||||
@@ -50,7 +50,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
before { allow(handler).to receive(:handle) { :garbage } }
|
||||
|
||||
it "falls back to 200" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 200
|
||||
end
|
||||
end
|
||||
@@ -59,7 +59,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
before { allow(handler).to receive(:handle) { :unknown } }
|
||||
|
||||
it "responds with 202" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 202
|
||||
end
|
||||
end
|
||||
@@ -73,7 +73,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
|
||||
context "when the stripe_account id on the event does not match any known accounts" do
|
||||
it "doesn't delete any Stripe accounts, responds with 204" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 204
|
||||
expect(StripeAccount.all).to include stripe_account
|
||||
end
|
||||
@@ -83,7 +83,7 @@ describe Stripe::WebhooksController, type: :controller do
|
||||
before { params["account"] = "webhook_id" }
|
||||
|
||||
it "deletes Stripe accounts in response to a webhook" do
|
||||
post 'create', params
|
||||
post 'create', params: params
|
||||
expect(response.status).to eq 200
|
||||
expect(StripeAccount.all).not_to include stripe_account
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user