Sha256: 084edbddc7b98096aa76f7832e857a9723e464b983e4a2acae0b82c9c3f9cac0

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'
require 'json'

RSpec.describe <%= @deserializer_class.capitalize %>Deserializer do
  let(:params) { {} }

  describe 'ok' do
    let(:params) { { payload: payload } }
    let(:parsed_params) { { <%= @deserializer_class %>: <%= @deserializer_class %>_params } }
    let(:payload) {
      {
    <% @deserializer_properties.each do |attribute| -%>
    <%= attribute %>: 'string',
    <% end -%>
    }
    }
    let(:<%= @deserializer_class %>_params) {
      {
    <% @deserializer_properties.each do |attribute| -%>
    <%= attribute %>: 'string',
    <% end -%>
    }
    }

    it { expect(described_class.parse(params)).to eq parsed_params }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobile_workflow-0.7.7 lib/generators/mobile_workflow/install/templates/deserializer_spec.rb.erb