Module: Shark::RSpec::Helpers::FormServiceHelper
- Included in:
- Shark::RSpec::Helpers
- Defined in:
- lib/shark/rspec/helpers/form_service_helper.rb
Instance Method Summary collapse
Instance Method Details
#form_inputs(attributes = {}) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/shark/rspec/helpers/form_service_helper.rb', line 17 def form_inputs(attributes = {}) data = SharkSpec.form_inputs_json['data'] data.map do |input| input['attributes'].merge!(attributes) Shark::FormService::V2::FormInput.new(input) end end |
#form_version(attributes = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/shark/rspec/helpers/form_service_helper.rb', line 7 def form_version(attributes = {}) defaults = { id: 1, state: 'active', structure: SharkSpec.form_structure_json } Shark::FormService::V2::FormVersion.new(defaults.merge(attributes)) end |