It has more sense to show the count of the investments the valuator is going to find in the investments valuation page.
24 lines
547 B
Ruby
24 lines
547 B
Ruby
require "rails_helper"
|
|
|
|
describe "Valuation budgets" do
|
|
before { login_as(create(:valuator).user) }
|
|
|
|
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
|