mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Use Estonian reference number format instead of ISO 11649
This commit is contained in:
parent
aa6e8f8a93
commit
5738c17731
25 changed files with 244 additions and 47 deletions
13
test/models/billing/reference_no_test.rb
Normal file
13
test/models/billing/reference_no_test.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue