From c2ec6ec93ac2bcffd6e0410eab026eb5a7b74850 Mon Sep 17 00:00:00 2001 From: Tomasz Stolarczyk Date: Tue, 24 Sep 2024 23:32:02 +0200 Subject: [PATCH] Cover remove remove_item path. --- rails_application/test/integration/orders_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rails_application/test/integration/orders_test.rb b/rails_application/test/integration/orders_test.rb index 9b166946..72bbdba8 100644 --- a/rails_application/test/integration/orders_test.rb +++ b/rails_application/test/integration/orders_test.rb @@ -44,6 +44,8 @@ def test_happy_path assert_changes -> { Product.find(fearless_id).stock_level }, from: 10, to: 8 do post "/orders/#{order_id}/add_item?product_id=#{fearless_id}" post "/orders/#{order_id}/add_item?product_id=#{fearless_id}" + post "/orders/#{order_id}/remove_item?product_id=#{fearless_id}" + post "/orders/#{order_id}/add_item?product_id=#{fearless_id}" end get "/orders/#{order_id}/edit" assert_remove_buttons_visible(async_remote_id, fearless_id, order_id)