Skip to content

Commit

Permalink
test Base class name generated from name/name_from_ancestor
Browse files Browse the repository at this point in the history
  • Loading branch information
notEthan committed Mar 10, 2022
1 parent f9948c9 commit cb77852
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/base_test.rb
Expand Up @@ -65,6 +65,12 @@ module Contact
end
describe 'class name' do
let(:schema_content) { {'$id' => 'https://jsi/BaseTest'} }
it 'generates a class name from module name' do
assert_equal('JSI::SchemaClasses::XPhonebook', Phonebook.new_jsi({}).class.name)
end
it 'generates a class name from module name_from_ancestor' do
assert_equal('JSI::SchemaClasses::XPhonebook__Contact_properties_phone_numbers', Phonebook::Contact.properties['phone_numbers'].new_jsi([]).class.name)
end
it 'generates a class name from schema_uri' do
assert_equal('JSI::SchemaClasses::Xhttps___jsi_BaseTest', subject.class.name)
end
Expand Down

0 comments on commit cb77852

Please sign in to comment.