Simplify getting URL to support an investment
We're also changing the method name to `vote_path` in order to be consistent with the way Rails uses `_path` for relative URLs.
This commit is contained in:
@@ -4,9 +4,7 @@ describe Budgets::Investments::VotesComponent, type: :component do
|
||||
describe "vote link" do
|
||||
context "when investment shows votes" do
|
||||
let(:investment) { create(:budget_investment, title: "Renovate sidewalks in Main Street") }
|
||||
let(:component) do
|
||||
Budgets::Investments::VotesComponent.new(investment, investment_votes: [], vote_url: "/")
|
||||
end
|
||||
let(:component) { Budgets::Investments::VotesComponent.new(investment, investment_votes: []) }
|
||||
|
||||
before { allow(investment).to receive(:should_show_votes?).and_return(true) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user