Extract budget form to a component
This way it will be easier to change it and reuse it.
This commit is contained in:
16
spec/components/admin/budgets/form_component_spec.rb
Normal file
16
spec/components/admin/budgets/form_component_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user