spec/integrations/webhook_spec.rb in onfido-1.0.0 vs spec/integrations/webhook_spec.rb in onfido-1.1.0

- old
+ new

@@ -12,17 +12,17 @@ ] } end it "creates the webhook" do - response = webhook.create(params) + response = webhook.create(**params) expect(response['id']).to_not be_nil end it "responds with the right url" do - response = webhook.create(params) + response = webhook.create(**params) expect(response["url"]).to eq params[:url] end end @@ -31,9 +31,16 @@ webhook_id = 'fcb73186-0733-4f6f-9c57-d9d5ef979443' response = webhook.find(webhook_id) expect(response['id']).to eq(webhook_id) + end + end + + describe "#destroy" do + it "removes the webhook" do + webhook_id = 'fcb73186-0733-4f6f-9c57-d9d5ef979443' + expect { webhook.destroy(webhook_id) }.not_to raise_error end end describe "#all" do it "returns all the registered webhooks" do