From d60f2429595a02a9e8051b6c96de906976814d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 7 Nov 2016 16:00:13 +0100 Subject: [PATCH] Strengthen budget spec --- spec/features/update_budget_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/features/update_budget_spec.rb b/spec/features/update_budget_spec.rb index 3120edf557..3aa7038959 100644 --- a/spec/features/update_budget_spec.rb +++ b/spec/features/update_budget_spec.rb @@ -53,10 +53,11 @@ describe 'updating a budget', type: :feature, js: true do expect(budget_page).to have_content('Successful update') budget_page.toggle_unit_costs! - expect(budget_page.unit_costs_at(1)).to have_content '150.00 EUR' + expect(page).to have_selector('tbody td.currency', text: '150.00 EUR') expect(budget_page.overall_unit_costs).to have_content '150.00 EUR' budget_page.toggle_labor_costs! + expect(page).to have_selector('tbody td.currency', text: '125.00 EUR') expect(budget_page.labor_costs_at(1)).to have_content '125.00 EUR' expect(budget_page.overall_labor_costs).to have_content '125.00 EUR' end @@ -106,10 +107,12 @@ describe 'updating a budget', type: :feature, js: true do expect(budget_page).to have_content('Successful update') budget_page.toggle_unit_costs! + expect(page).to have_selector('tbody td.currency', text: '250.00 EUR') expect(budget_page.unit_costs_at(1)).to have_content '250.00 EUR' expect(budget_page.overall_unit_costs).to have_content '250.00 EUR' budget_page.toggle_labor_costs! + expect(page).to have_selector('tbody td.currency', text: '75.00 EUR') expect(budget_page.labor_costs_at(1)).to have_content '75.00 EUR' expect(budget_page.overall_labor_costs).to have_content '75.00 EUR' end