|
19 | 19 | width: 20, |
20 | 20 | height: 20 |
21 | 21 | }, |
| 22 | + pickup: { |
| 23 | + pickup_time: { |
| 24 | + earliest: "2015-09-15T09:00:00+02:00", |
| 25 | + latest: "2015-09-15T18:00:00+02:00" |
| 26 | + }, |
| 27 | + pickup_address: { |
| 28 | + company: "Sender Ltd.", |
| 29 | + first_name: "Jane", |
| 30 | + last_name: "Doe", |
| 31 | + street: "Musterstraße", |
| 32 | + street_no: "42", |
| 33 | + zip_code: "54321", |
| 34 | + city: "Musterstadt", |
| 35 | + country: "DE" |
| 36 | + }, |
| 37 | + }, |
22 | 38 | metadata: { |
23 | 39 | product: { |
24 | 40 | name: "foo" |
|
32 | 48 | id: "123456", |
33 | 49 | contents_type: "commercial_goods", |
34 | 50 | }, |
35 | | - pickup: { |
36 | | - pickup_time: { |
37 | | - earliest: "2020-07-24T13:59:58+23:57", |
38 | | - latest: "2020-07-24T18:59:58+23:57", |
39 | | - } |
40 | | - } |
41 | 51 | } |
42 | 52 | end |
43 | 53 |
|
|
62 | 72 | expect(shipment.package[:width]).to eq 20 |
63 | 73 | expect(shipment.package[:height]).to eq 20 |
64 | 74 |
|
| 75 | + expect(shipment.pickup[:pickup_time][:earliest]).to eq "2015-09-15T09:00:00+02:00" |
| 76 | + expect(shipment.pickup[:pickup_time][:latest]).to eq "2015-09-15T18:00:00+02:00" |
| 77 | + expect(shipment.pickup[:pickup_address][:company]).to eq "Sender Ltd." |
| 78 | + expect(shipment.pickup[:pickup_address][:first_name]).to eq "Jane" |
| 79 | + expect(shipment.pickup[:pickup_address][:last_name]).to eq "Doe" |
| 80 | + expect(shipment.pickup[:pickup_address][:street]).to eq "Musterstraße" |
| 81 | + expect(shipment.pickup[:pickup_address][:street_no]).to eq "42" |
| 82 | + expect(shipment.pickup[:pickup_address][:zip_code]).to eq "54321" |
| 83 | + expect(shipment.pickup[:pickup_address][:city]).to eq "Musterstadt" |
| 84 | + expect(shipment.pickup[:pickup_address][:country]).to eq "DE" |
| 85 | + |
65 | 86 | expect(shipment.customs_declaration[:id]).to eq "123456" |
66 | 87 | expect(shipment.customs_declaration[:contents_type]).to eq "commercial_goods" |
67 | | - expect(shipment.pickup[:pickup_time][:earliest]).to eq "2020-07-24T13:59:58+23:57" |
68 | | - expect(shipment.pickup[:pickup_time][:latest]).to eq "2020-07-24T18:59:58+23:57" |
69 | 88 | end |
70 | 89 |
|
71 | 90 | it "initializes the metadata correctly" do |
|
0 commit comments