From 467b9e71a29b7f4e20c55f9d76700f61e013e6c4 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 1 Feb 2021 19:59:27 +0000 Subject: [PATCH] adds additional test case, in which a negative payment is added to an order --- spec/features/admin/customers_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/features/admin/customers_spec.rb b/spec/features/admin/customers_spec.rb index 28b9118577..7838a34bf3 100644 --- a/spec/features/admin/customers_spec.rb +++ b/spec/features/admin/customers_spec.rb @@ -136,6 +136,19 @@ feature 'Customers' do expect(page).to have_content "$0.00" end end + + # this adds the additional payments to an order, and checks for customer balance + it "updates customer balance with additional negative payments, on an order" do + + payment2 + + select2_select managed_distributor1.name, from: "shop_id" + + within "tr#c_#{customer1.id}" do + expect(page).to have_content "CREDIT OWED" + expect(page).to have_content "$63.00" + end + end end it "allows updating of attributes" do