Skip to content

Commit

Permalink
IN-392 Adds specs for add_returns webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
reinaldob committed Dec 16, 2014
1 parent ce828d7 commit 110cef5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/salesforce_endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
end
end

context "returns" do
let(:payload) do
payload = Factories.send("add_returns_payload")
payload.merge(parameters: config)
end

it "adds" do
VCR.use_cassette "requests/add_returns" do
post "/add_returns", payload.to_json, auth

expect(json_response["summary"]).to match "Returns marked in Order"
expect(last_response.status).to eq 200
end
end
end

it "adds customer" do
payload = Factories.add_customer_payload.merge(parameters: config)
email = payload['customer']['email']
Expand Down

0 comments on commit 110cef5

Please sign in to comment.