mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Move class to lib, add sugar, add tests
This commit is contained in:
parent
74e3d5461b
commit
45dfa57529
10 changed files with 71 additions and 36 deletions
16
test/lib/xsd_util/xsd_util_test.rb
Normal file
16
test/lib/xsd_util/xsd_util_test.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
require 'test_helper'
|
||||
require 'xsd/util'
|
||||
|
||||
class XsdUtilTest < ActiveSupport::TestCase
|
||||
def test_single_part_name
|
||||
version = Xsd::Util.call(schema_path: 'test/fixtures/files/schemas', for_prefix: 'abcde')
|
||||
|
||||
assert_equal 'abcde-1.2.xsd', version
|
||||
end
|
||||
|
||||
def test_double_part_name
|
||||
version = Xsd::Util.call(schema_path: 'test/fixtures/files/schemas', for_prefix: 'abcde-fghij')
|
||||
|
||||
assert_equal 'abcde-fghij-1.3.xsd', version
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue