spec/sendle/api/quote_spec.rb in sendle-api-0.0.11 vs spec/sendle/api/quote_spec.rb in sendle-api-0.0.12
- old
+ new
@@ -42,11 +42,11 @@
expect(response.json).to eq JSON.parse(QUOTE_NO_PLAN_RESPONSE)
end
context "passing in a plan_name" do
it "checks a valid plan name is passed in" do
- PLANS.each do |plan|
+ Sendle::Api::PLANS.each do |plan|
params[:plan_name] = plan
expect(RestClient::Request).to receive(:execute).and_return(QUOTE_NO_PLAN_RESPONSE)
Sendle::Api::Quote.execute(params)
end
@@ -62,15 +62,15 @@
method: :get,
url: Sendle::Api::Quote.url,
headers: {
accept: :json,
content_type: :json,
- params: params.merge(plan_name: PLAN_EASY)
+ params: params.merge(plan_name: Sendle::Api::PLAN_EASY)
}
}
expect(RestClient::Request).to receive(:execute).with(hash_including(expected_params)).and_return(QUOTE_NO_PLAN_RESPONSE)
- Sendle::Api::Quote.execute(params.merge(plan_name: PLAN_EASY))
+ Sendle::Api::Quote.execute(params.merge(plan_name: Sendle::Api::PLAN_EASY))
end
end
it "passes optional params" do
expected_params = {