Rename util class, add first usage

This commit is contained in:
Alex Sherman 2021-05-21 11:45:22 +05:00
parent 45dfa57529
commit a0d0ce3e00
5 changed files with 33 additions and 22 deletions

View file

@ -0,0 +1,21 @@
require 'test_helper'
require 'xsd/schema'
class XsdSchemaTest < ActiveSupport::TestCase
def setup
@schema_path = 'test/fixtures/files/schemas'
super
end
def test_single_part_name
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde')
assert_equal Xsd::Schema::BASE_URL + 'abcde-1.2.xsd', filename
end
def test_double_part_name
filename = Xsd::Schema.filename(schema_path: @schema_path, for_prefix: 'abcde-fghij')
assert_equal Xsd::Schema::BASE_URL + 'abcde-fghij-1.3.xsd', filename
end
end