Skip to content

Commit 3cf6dd7

Browse files
committed
Fix test
1 parent ea42937 commit 3cf6dd7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/integration/orders_spec.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@
4040

4141
create_order_response = Patch::Order.create_order(mass_g: order_mass_g, project_id: project_id)
4242

43+
order = create_order_response.data
4344
expect(create_order_response.success).to eq true
44-
expect(create_order_response.data.id).not_to be_nil
45-
expect(create_order_response.data.mass_g).to eq(order_mass_g)
46-
expect(create_order_response.data.price_cents_usd.to_i).to eq(expected_price)
47-
expect(create_order_response.data.patch_fee_cents_usd).not_to be_empty
45+
expect(order.id).not_to be_nil
46+
expect(order.mass_g).to eq(order_mass_g)
47+
expect(order.price_cents_usd.to_i).to be_between(expected_price - 1, expected_price + 1)
48+
expect(order.patch_fee_cents_usd).not_to be_empty
4849
end
4950

5051
it 'supports create with a total price' do

0 commit comments

Comments
 (0)