Files
grecia/spec/system/valuation/budgets_spec.rb
Senén Rodero Rodríguez 282b8f8697 Load all the published budgets in the valuation interface
As now multiple budget can coexist at the same time it has sense to be able to
browse all the published budgets in the valuation budgets index page.
2023-02-03 11:01:41 +01:00

27 lines
652 B
Ruby

require "rails_helper"
describe "Valuation budgets" do
before do
valuator = create(:valuator, user: create(:user, username: "Rachel", email: "rachel@valuators.org"))
login_as(valuator.user)
end
context "Index" do
scenario "Displays published budgets" do
create(:budget, name: "Sports")
create(:budget, name: "Draft", published: false)
visit valuation_budgets_path
expect(page).to have_content("Sports")
expect(page).not_to have_content("Draft")
end
scenario "With no budgets" do
visit valuation_budgets_path
expect(page).to have_content "There are no budgets"
end
end
end