Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/faker/default/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def indian_gst_number(state_code: nil)
g_.letter(length: 3, ranges: ['A'..'Z'])
g_.letter(length: 1, ranges: [%w[A B C F G H L J P T K]])
g_.letter(length: 1, ranges: ['A'..'Z'])
g_.int(length: 4, ranges: [0..9999])
g_.int(length: 4)
g_.letter(length: 1, ranges: ['A'..'Z'])
end

Expand Down
4 changes: 2 additions & 2 deletions test/faker/default/test_faker_company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ def test_spanish_b_algorithm
assert_equal(3, @tester.send(:spanish_b_algorithm, 6))
end

def text_indian_gst_number
assert_match(/^([0-2][0-9]|3[0-7])[A-Z]{3}[ABCFGHLJPTK][A-Z]\d{4}[A-Z][A-Z0-9]Z[A-Z0-9]$/i, @tester.indian_gst_number)
def test_indian_gst_number
assert_match(/^(0[2-9]|[12][0-9]|3[0-8]|98)[A-Z]{3}[ABCFGHLJPTK][A-Z]\d{4}[A-Z][A-Z0-9]Z[A-Z0-9]$/i, @tester.indian_gst_number)
end

def test_state_code_in_indian_gst_number
Expand Down