Sha256: 0be4e8918726ac386443986bf2f6300bff565a9c77741e0f9169fbeecc725f8b
Contents?: true
Size: 608 Bytes
Versions: 15
Compression:
Stored size: 608 Bytes
Contents
require 'spec_helper' module PlaidRails describe WebhooksController do routes { PlaidRails::Engine.routes } it "create webhook" do params={"webhook"=>{"code"=> "0", "message"=> "hello", "access_token"=> "test_wells"}} expect(PlaidRails::Webhook).to receive(:create!).with(params["webhook"]). and_return({code: 0, message: "hello", access_token: 'test_wells'}) post :create, params, format: :json expect(response.status).to eq 200 parsed_body = JSON.load(response.body) expect(parsed_body['access_token']).to eq "test_wells" end end end
Version data entries
15 entries across 15 versions & 1 rubygems