mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
13 lines
369 B
Ruby
13 lines
369 B
Ruby
require 'test_helper'
|
|
|
|
class ReferenceNoTest < ActiveSupport::TestCase
|
|
def test_returns_format_regexp
|
|
format = /\A\d{2,20}\z/
|
|
assert_equal format, Billing::ReferenceNo::REGEXP
|
|
end
|
|
|
|
def test_generated_reference_number_conforms_to_format
|
|
reference_no = Billing::ReferenceNo.generate
|
|
assert_match Billing::ReferenceNo::REGEXP, reference_no
|
|
end
|
|
end
|