Sha256: 48d33f8d026b138e6de7098ab362ba3b64d8072c8935880c9c24c8f8237440e9

Contents?: true

Size: 616 Bytes

Versions: 4

Compression:

Stored size: 616 Bytes

Contents

require 'spec_helper'

describe JsonSchemaSpec do
  describe "#json_schema_params" do

    it "generates proper params" do
      request, response = json_schema_params(:user, :get)

      expect(request).to eq(
        :id    => request[:id],
        :token => "token"
      )
      
      expect(response).to eq([{
        :id       => response[0][:id],
        :name     => "name",
        :company  => {
          :name   => "company:name"
        },
        :articles => [
          {
            :body  => "articles:body",
            :title => "articles:title"
          }
        ]
      }])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
json_schema_spec-0.0.9 spec/json_schema_spec_spec.rb
json_schema_spec-0.0.8 spec/json_schema_spec_spec.rb
json_schema_spec-0.0.7 spec/json_schema_spec_spec.rb
json_schema_spec-0.0.6 spec/json_schema_spec_spec.rb