Strengthen budget spec

pull/6827/head
Oliver Günther 8 years ago
parent 9d531433f4
commit d60f242959
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 5
      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

Loading…
Cancel
Save