Skip to content

Commit

Permalink
Correct reversed params in asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
marlena-b committed Feb 17, 2025
1 parent ad9e65d commit 0074aa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rails_application/test/orders/item_added_to_refund_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ def test_add_item_to_refund

AddItemToRefund.new.call(item_added_to_refund(refund_id, order_id, product_id))

assert_equal(Refunds::RefundItem.count, 1)
assert_equal(1, Refunds::RefundItem.count)
refund_item = Refunds::RefundItem.find_by(refund_uid: refund_id, product_uid: product_id)
assert_equal(product_id, refund_item.product_uid)
assert_equal(1, refund_item.quantity)
assert_equal(50, refund_item.price)

assert_equal(Refunds::Refund.count, 1)
assert_equal(1, Refunds::Refund.count)
refund = Refunds::Refund.find_by(uid: refund_id)
assert_equal(refund.status, "Draft")
assert_equal("Draft", refund.status)
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def test_remove_item_from_refund

RemoveItemFromRefund.new.call(item_removed_from_refund(refund_id, order_id, product_id))

assert_equal(Refunds::RefundItem.count, 1)
assert_equal(1, Refunds::RefundItem.count)
refund_item = Refunds::RefundItem.find_by(refund_uid: refund_id, product_uid: another_product_id)
assert_equal(another_product_id, refund_item.product_uid)
assert_equal(1, refund_item.quantity)
assert_equal(30, refund_item.price)

assert_equal(Refunds::Refund.count, 1)
assert_equal(1, Refunds::Refund.count)
refund = Refunds::Refund.find_by(uid: refund_id)
assert_equal(refund.status, "Draft")
assert_equal("Draft", refund.status)
end

private
Expand Down

0 comments on commit 0074aa2

Please # to comment.