Extract method to check the current phase

This commit is contained in:
Javi Martín
2021-02-18 20:34:24 +01:00
parent 46e80bf430
commit 70cf956210
4 changed files with 7 additions and 3 deletions

View File

@@ -273,7 +273,7 @@ describe "Admin budgets", :admin do
expect(page).to have_content("#{phase.starts_at.to_date} - #{phase.ends_at.to_date}")
expect(page).to have_css(".budget-phase-enabled.enabled")
expect(page).to have_link("Edit phase", href: edit_phase_link)
expect(page).to have_content("Active") if budget.current_phase == phase
expect(page).to have_content("Active") if phase.current?
end
end
end