mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
Rename util class, add first usage
This commit is contained in:
parent
45dfa57529
commit
a0d0ce3e00
5 changed files with 33 additions and 22 deletions
21
test/lib/xsd_schema/xsd_schema_test.rb
Normal file
21
test/lib/xsd_schema/xsd_schema_test.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue