spec/shipcloud/shipment_quote_spec.rb in shipcloud-0.11.0 vs spec/shipcloud/shipment_quote_spec.rb in shipcloud-0.12.0
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
require "spec_helper"
describe Shipcloud::ShipmentQuote do
valid_attributes = {
to: {
@@ -20,12 +21,12 @@
carrier: "dhl",
package: {
weight: 2.5,
length: 40,
width: 20,
- height: 20
- }
+ height: 20,
+ },
}
describe "#initialize" do
it "initializes all attributes correctly" do
quote = Shipcloud::ShipmentQuote.new(valid_attributes)
@@ -60,11 +61,11 @@
it "initializes a ShipmentQuote with price" do
allow(Shipcloud).to receive(:request).
and_return(
"shipment_quote" => {
- "price" => 42.12
- }
+ "price" => 42.12,
+ },
)
shipment_quote = Shipcloud::ShipmentQuote.create(valid_attributes)
expect(shipment_quote.price).to eq 42.12