From 3160d723b04cc8b1122da42437f5b7393c547c40 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Tue, 2 Feb 2021 10:00:59 +0000 Subject: [PATCH] checks whether second payment was added correctly to the order --- spec/features/admin/customers_spec.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/spec/features/admin/customers_spec.rb b/spec/features/admin/customers_spec.rb index 7838a34bf3..89258fdf6b 100644 --- a/spec/features/admin/customers_spec.rb +++ b/spec/features/admin/customers_spec.rb @@ -137,17 +137,22 @@ feature 'Customers' do end end - # this adds the additional payments to an order, and checks for customer balance + # 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 + # verifies the payment2 was correctly added to the order + visit spree.admin_order_payments_path order1 + expect(page).to have_content "$-25.00" + + visit admin_customers_path select2_select managed_distributor1.name, from: "shop_id" + # checks customer balance, after payment2 was added within "tr#c_#{customer1.id}" do - expect(page).to have_content "CREDIT OWED" - expect(page).to have_content "$63.00" - end + expect(page).to have_content "CREDIT OWED" + expect(page).to have_content "$63.00" + end end end