Sha256: cabb0917164626bcbe94fd0c6b0cb84afefe0eaf553d737cc5932394212aaa61

Contents?: true

Size: 453 Bytes

Versions: 2

Compression:

Stored size: 453 Bytes

Contents

require 'test_helper'

class TestJsonSchemaParser < Minitest::Test

  def test_parse_file
    file_path = File.expand_path('test/doc/schemas/account_post_request_body.schema.json', Dir.pwd)
    result = Swagui::JsonSchemaParser.parse(file_path, 'PostAccount')
    assert_equal result.class, Swagui::JsonSchema
    assert_equal result.name, 'PostAccount'
    assert_equal result.models.size, 2
    assert_equal result.models.first.class, Hash
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
swagui-0.2.1 test/test_json_schema_parser.rb
swagui-0.2.0 test/test_json_schema_parser.rb