Skip to content

Commit

Permalink
Update spec
Browse files Browse the repository at this point in the history
  • Loading branch information
pcothenet committed Jul 14, 2021
1 parent 7bf9130 commit 2b2134d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions spec/integration/orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
expect(create_order_response.success).to eq true
expect(order.id).not_to be_nil
expect(order.mass_g).to eq(order_mass_g)
expect(order.price_cents_usd.to_i).to be_between(expected_price - 2, expected_price + 2)
expect(order.patch_fee_cents_usd).not_to be_empty
expect(order.price_cents_usd).to be_between(expected_price - 2, expected_price + 2)
expect(order.patch_fee_cents_usd).to be_kind_of(Integer)
expect(order.registry_url).not_to be_empty
end

Expand All @@ -55,7 +55,7 @@
)

project_id = retrieve_project_response.data.id
total_price_cents_usd = 5_00
total_price_cents_usd = 50_00

create_order_response = Patch::Order.create_order(
total_price_cents_usd: total_price_cents_usd,
Expand All @@ -67,13 +67,7 @@
order = create_order_response.data

expect(order.id).not_to be_nil
expect(order.mass_g).to be > 450_000
expect(order.mass_g).to be < 460_000
expect(order.price_cents_usd).not_to be_empty
expect(order.patch_fee_cents_usd).not_to be_empty
expect(
order.price_cents_usd.to_i + order.patch_fee_cents_usd.to_i
).to eq(total_price_cents_usd)
expect(order.price_cents_usd + order.patch_fee_cents_usd).to eq total_price_cents_usd
expect(order.registry_url).not_to be_empty
end

Expand Down

0 comments on commit 2b2134d

Please sign in to comment.