Extract budget form to a component

This way it will be easier to change it and reuse it.
This commit is contained in:
Javi Martín
2021-06-04 21:58:09 +02:00
parent e9fb95d8d7
commit 82e8de094b
8 changed files with 74 additions and 54 deletions

View File

@@ -0,0 +1,16 @@
require "rails_helper"
describe Admin::Budgets::FormComponent, type: :component do
describe "#voting_styles_select_options" do
it "provides vote kinds" do
types = [
["Knapsack", "knapsack"],
["Approval", "approval"]
]
component = Admin::Budgets::FormComponent.new(double)
expect(component.voting_styles_select_options).to eq(types)
end
end
end