Sha256: 7d0bd20a5e0bff96e3c81cd2dba53b018c2b4d49a29af1b077dcc0d0fff1efa3

Contents?: true

Size: 664 Bytes

Versions: 11

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

module Shark
  module RSpec
    module Helpers
      module FormServiceHelper
        def form_version(attributes = {})
          defaults = {
            id: 1,
            state: 'active',
            structure: SharkSpec.form_structure_json
          }

          Shark::FormService::V2::FormVersion.new(defaults.merge(attributes))
        end

        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
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bima-shark-sdk-3.1.1 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.5.0 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-3.1.0 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-3.0.0 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.4.4 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.4.3 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.4.2 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.4.1 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.4.0 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.3.1 lib/shark/rspec/helpers/form_service_helper.rb
bima-shark-sdk-2.3.0 lib/shark/rspec/helpers/form_service_helper.rb