gpav 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +41 -0
- data/Gemfile +4 -0
- data/LICENSE +1 -1
- data/Rakefile +7 -5
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/gpav.gemspec +33 -0
- data/lib/gpav.rb +6 -4
- data/lib/{validators → gpav/validators}/afm.rb +0 -0
- data/lib/{validators → gpav/validators}/amka.rb +0 -0
- data/lib/{validators → gpav/validators}/cheque.rb +0 -0
- data/lib/{validators → gpav/validators}/iban.rb +0 -0
- data/lib/gpav/version.rb +3 -0
- metadata +60 -15
- data/test/test_afm.rb +0 -46
- data/test/test_amka.rb +0 -46
- data/test/test_cheque.rb +0 -46
- data/test/test_iban.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0dd1a4a2a0f0728507daf62f3ac5c50fbdc960
|
4
|
+
data.tar.gz: ef73ec7a1988d178c32dcf4b4cd1ca12b1123016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b33588d90cf369d0c4b6e7114a0bd08fed23be363e8fb4538481c6bf26844390bf22234821b1a125f98c55e57013013bc31d3b0e212d291fcdc41b7fe64cbd1c
|
7
|
+
data.tar.gz: ca6eefcdc063db8d702662f938ccdf72db6c7a22f4aeef6246a29518dc1fd9855292b638d6b35b7df2ffc7ad1d9970d2332e032d34746ba59ce4eb8b7619aab0
|
data/.gitignore
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
# Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
/info
|
34
|
+
/.idea
|
35
|
+
/projectFilesBackup
|
36
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
37
|
+
.rvmrc
|
38
|
+
|
39
|
+
/.yardoc
|
40
|
+
/Gemfile.lock
|
41
|
+
|
data/Gemfile
ADDED
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
require
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
2
3
|
|
3
|
-
Rake::TestTask.new do |t|
|
4
|
-
t.libs <<
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
|
+
t.libs << "test"
|
6
|
+
t.libs << "lib"
|
7
|
+
t.test_files = FileList['test/**/*_test.rb']
|
5
8
|
end
|
6
9
|
|
7
|
-
|
8
|
-
task :default => :test
|
10
|
+
task :default => :test
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "number_read_out"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/gpav.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'gpav/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'gpav'
|
8
|
+
spec.version = Gpav::VERSION
|
9
|
+
spec.authors = ["Michail Pantelelis"]
|
10
|
+
spec.email = ["mpantel@aegean.gr"]
|
11
|
+
|
12
|
+
spec.summary = "Greek Publc Administration Validators"
|
13
|
+
spec.description = "Validators for AFM, Cheque numbers, AMKA and IBAN"
|
14
|
+
spec.homepage = "https://github.com/mpantel/gpav"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
#if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
#else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
#end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
33
|
+
end
|
data/lib/gpav.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
require 'validators/
|
4
|
-
require 'validators/
|
1
|
+
require "gpav/version"
|
2
|
+
|
3
|
+
require 'gpav/validators/afm'
|
4
|
+
require 'gpav/validators/amka'
|
5
|
+
require 'gpav/validators/cheque'
|
6
|
+
require 'gpav/validators/iban'
|
5
7
|
module Gpav
|
6
8
|
|
7
9
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/gpav/version.rb
ADDED
metadata
CHANGED
@@ -1,33 +1,78 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gpav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michail Pantelelis
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2016-05-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
13
55
|
description: Validators for AFM, Cheque numbers, AMKA and IBAN
|
14
|
-
email:
|
56
|
+
email:
|
57
|
+
- mpantel@aegean.gr
|
15
58
|
executables: []
|
16
59
|
extensions: []
|
17
60
|
extra_rdoc_files: []
|
18
61
|
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
19
64
|
- LICENSE
|
20
65
|
- README.md
|
21
66
|
- Rakefile
|
67
|
+
- bin/console
|
68
|
+
- bin/setup
|
69
|
+
- gpav.gemspec
|
22
70
|
- lib/gpav.rb
|
23
|
-
- lib/validators/afm.rb
|
24
|
-
- lib/validators/amka.rb
|
25
|
-
- lib/validators/cheque.rb
|
26
|
-
- lib/validators/iban.rb
|
27
|
-
-
|
28
|
-
- test/test_amka.rb
|
29
|
-
- test/test_cheque.rb
|
30
|
-
- test/test_iban.rb
|
71
|
+
- lib/gpav/validators/afm.rb
|
72
|
+
- lib/gpav/validators/amka.rb
|
73
|
+
- lib/gpav/validators/cheque.rb
|
74
|
+
- lib/gpav/validators/iban.rb
|
75
|
+
- lib/gpav/version.rb
|
31
76
|
homepage: https://github.com/mpantel/gpav
|
32
77
|
licenses:
|
33
78
|
- MIT
|
@@ -40,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
40
85
|
requirements:
|
41
86
|
- - ">="
|
42
87
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
88
|
+
version: '0'
|
44
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
90
|
requirements:
|
46
91
|
- - ">="
|
@@ -48,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
93
|
version: '0'
|
49
94
|
requirements: []
|
50
95
|
rubyforge_project:
|
51
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.5.1
|
52
97
|
signing_key:
|
53
98
|
specification_version: 4
|
54
99
|
summary: Greek Publc Administration Validators
|
data/test/test_afm.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../lib/validators/afm'
|
3
|
-
|
4
|
-
class TestAfm < Minitest::Unit::TestCase
|
5
|
-
include Gpav::Validators
|
6
|
-
|
7
|
-
def test_valid_afm_validation
|
8
|
-
valid_afm = ['101676480', '102676489', '103676487']
|
9
|
-
valid_afm.each do |a|
|
10
|
-
assert Afm.valid?(a), "ΑΦΜ verification failed: #{a}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_invalid_afm_validation
|
15
|
-
invalid_afm = ['101676481', '102676481', '103676481', '000000000']
|
16
|
-
invalid_afm.each do |a|
|
17
|
-
refute Afm.valid?(a), "Invalid ΑΦΜ wrong verification: #{a}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_empty_afm
|
22
|
-
refute Afm.valid?(""), 'Invalid ΑΦΜ wrong verification: ""'
|
23
|
-
refute Afm.valid?(nil), 'Invalid ΑΦΜ wrong verification: nil'
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_wrong_length_afm
|
27
|
-
refute Afm.valid?('01676480'), 'Invalid ΑΦΜ wrong verification: less numbers'
|
28
|
-
refute Afm.valid?('10167680'), 'Invalid ΑΦΜ wrong verification: less numbers'
|
29
|
-
refute Afm.valid?('1016763480'), 'Invalid ΑΦΜ wrong verification: more numbers'
|
30
|
-
refute Afm.valid?('1012676480'), 'Invalid ΑΦΜ wrong verification: more numbers'
|
31
|
-
refute Afm.valid?('1016762480'), 'Invalid ΑΦΜ wrong verification: more numbers'
|
32
|
-
refute Afm.valid?('1016764802'), 'Invalid ΑΦΜ wrong verification: more numbers'
|
33
|
-
refute Afm.valid?('1101676480'), 'Invalid ΑΦΜ wrong verification: more numbers'
|
34
|
-
refute Afm.valid?('101676480 '), 'Invalid ΑΦΜ wrong verification: with spaceses'
|
35
|
-
refute Afm.valid?(' 101676480'), 'Invalid ΑΦΜ wrong verification: with spaceses'
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_includes_letters_afm
|
39
|
-
refute Afm.valid?('10d676480'), 'Invalid ΑΦΜ wrong verification: with letters'
|
40
|
-
refute Afm.valid?('101676s80'), 'Invalid ΑΦΜ wrong verification: with letters'
|
41
|
-
refute Afm.valid?('10167648s'), 'Invalid ΑΦΜ wrong verification: with letters'
|
42
|
-
refute Afm.valid?('a01676480'), 'Invalid ΑΦΜ wrong verification: with letters'
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
end
|
data/test/test_amka.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../lib/validators/amka'
|
3
|
-
|
4
|
-
class TestAmka < Minitest::Unit::TestCase
|
5
|
-
include Gpav::Validators
|
6
|
-
|
7
|
-
def test_valid_amka_validation
|
8
|
-
valid_amka = ['15067603256', '16057602159', '16067502233']
|
9
|
-
valid_amka.each do |a|
|
10
|
-
assert Amka.valid?(a), "ΑΜΚΑ verification failed: #{a}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_invalid_amka_validation
|
15
|
-
invalid_amka = ['15067603253', '16057602153', '16067502232', '00000000000']
|
16
|
-
invalid_amka.each do |a|
|
17
|
-
refute Amka.valid?(a), "Invalid ΑΜΚΑ wrong verification: #{a}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_empty_amka
|
22
|
-
refute Amka.valid?(""), 'Invalid ΑΜΚΑ wrong verification: ""'
|
23
|
-
refute Amka.valid?(nil), 'Invalid ΑΜΚΑ wrong verification: nil'
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_wrong_length_amka
|
27
|
-
refute Amka.valid?('1506760325'), 'Invalid ΑΜΚΑ wrong verification: less numbers'
|
28
|
-
refute Amka.valid?('5067603256'), 'Invalid ΑΜΚΑ wrong verification: less numbers'
|
29
|
-
refute Amka.valid?('115067603256'), 'Invalid ΑΜΚΑ wrong verification: more numbers'
|
30
|
-
refute Amka.valid?('125067603256'), 'Invalid ΑΜΚΑ wrong verification: more numbers'
|
31
|
-
refute Amka.valid?('153067603256'), 'Invalid ΑΜΚΑ wrong verification: more numbers'
|
32
|
-
refute Amka.valid?('150676032564'), 'Invalid ΑΜΚΑ wrong verification: more numbers'
|
33
|
-
refute Amka.valid?('150a67603256'), 'Invalid ΑΜΚΑ wrong verification: more numbers'
|
34
|
-
refute Amka.valid?('15067603256 '), 'Invalid ΑΜΚΑ wrong verification: with spaceses'
|
35
|
-
refute Amka.valid?(' 15067603256'), 'Invalid ΑΜΚΑ wrong verification: with spaceses'
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_includes_letters_amka
|
39
|
-
refute Amka.valid?('15067a03256'), 'Invalid ΑΜΚΑ wrong verification: with letters'
|
40
|
-
refute Amka.valid?('1506760s356'), 'Invalid ΑΜΚΑ wrong verification: with letters'
|
41
|
-
refute Amka.valid?('1506760356s'), 'Invalid ΑΜΚΑ wrong verification: with letters'
|
42
|
-
refute Amka.valid?('s1506760356'), 'Invalid ΑΜΚΑ wrong verification: with letters'
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
end
|
data/test/test_cheque.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../lib/validators/cheque'
|
3
|
-
|
4
|
-
class TestCheque < Minitest::Unit::TestCase
|
5
|
-
include Gpav::Validators
|
6
|
-
|
7
|
-
def test_valid_cheque_validation
|
8
|
-
valid_cheque = %w(72349701-0 72349702-8 72349703-6 72349704-4 72349705-2 72349706-1 72349707-9 72349708-7 72349709-5)
|
9
|
-
valid_cheque.each do |a|
|
10
|
-
assert Cheque.valid?(a), "Cheque verification failed: #{a}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_invalid_cheque_validation
|
15
|
-
invalid_cheque = %w(72349201-0 72339702-8 72349703-4 72345704-4 62349705-2 78349706-1 72349797-9 72049708-7 72049709-5 00000000-0)
|
16
|
-
invalid_cheque.each do |a|
|
17
|
-
refute Cheque.valid?(a), "Invalid Cheque wrong verification: #{a}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_empty_cheque
|
22
|
-
refute Cheque.valid?(""), 'Invalid Cheque wrong verification: ""'
|
23
|
-
refute Cheque.valid?(nil), 'Invalid Cheque wrong verification: nil'
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_wrong_length_cheque
|
27
|
-
refute Cheque.valid?('7234901-0'), 'Invalid Cheque wrong verification: less numbers'
|
28
|
-
refute Cheque.valid?('2349701-0'), 'Invalid Cheque wrong verification: less numbers'
|
29
|
-
refute Cheque.valid?('742349701-0'), 'Invalid Cheque wrong verification: more numbers'
|
30
|
-
refute Cheque.valid?('72349701-05'), 'Invalid Cheque wrong verification: more numbers'
|
31
|
-
refute Cheque.valid?('723497015-0'), 'Invalid Cheque wrong verification: more numbers'
|
32
|
-
refute Cheque.valid?('72349701--0'), 'Invalid Cheque wrong verification: more numbers'
|
33
|
-
refute Cheque.valid?('723497015-0'), 'Invalid Cheque wrong verification: more numbers'
|
34
|
-
refute Cheque.valid?('72349701-0 '), 'Invalid Cheque wrong verification: with spaceses'
|
35
|
-
refute Cheque.valid?(' 72349701-0'), 'Invalid Cheque wrong verification: with spaceses'
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_includes_letters_cheque
|
39
|
-
refute Cheque.valid?('72349701+0'), 'Invalid Cheque wrong verification: with letters'
|
40
|
-
refute Cheque.valid?('72349701a0'), 'Invalid Cheque wrong verification: with letters'
|
41
|
-
refute Cheque.valid?('7234s701-0'), 'Invalid Cheque wrong verification: with letters'
|
42
|
-
refute Cheque.valid?('7a349701-0'), 'Invalid Cheque wrong verification: with letters'
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
end
|
data/test/test_iban.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../lib/validators/iban'
|
3
|
-
|
4
|
-
class TestIban < Minitest::Unit::TestCase
|
5
|
-
include Gpav::Validators
|
6
|
-
|
7
|
-
def test_valid_iban_validation
|
8
|
-
valid_iban = %w(GR9401406010601002001000246 GR5401406010601002001000190 GR9101406010601002001000300 GR9001406010601002001000318 GR0701406010601002001001812)
|
9
|
-
valid_iban.each do |a|
|
10
|
-
assert Iban.valid?(a), "IBAN verification failed: #{a}"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_invalid_iban_validation
|
15
|
-
invalid_iban = %w(DR9401406010601002001000246 GF5401406010601002001000190 GR9101406010631002001000300 GR9001406010601002001400318 GR0701406010601002001001814)
|
16
|
-
invalid_iban.each do |a|
|
17
|
-
refute Iban.valid?(a), "Invalid IBAN wrong verification: #{a}"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_empty_iban
|
22
|
-
refute Iban.valid?(""), 'Invalid IBAN wrong verification: ""'
|
23
|
-
refute Iban.valid?(nil), 'Invalid IBAN wrong verification: nil'
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_wrong_length_iban
|
27
|
-
refute Iban.valid?('9401406010601002001000246'), 'Invalid IBAN wrong verification: less numbers'
|
28
|
-
refute Iban.valid?('R9401406010601002001000246'), 'Invalid IBAN wrong verification: less numbers'
|
29
|
-
refute Iban.valid?('GR940140601060100200100024'), 'Invalid IBAN wrong verification: less numbers'
|
30
|
-
refute Iban.valid?('G2R9401406010601002001000246'), 'Invalid IBAN wrong verification: more numbers'
|
31
|
-
refute Iban.valid?('GGR9401406010601002001000246'), 'Invalid IBAN wrong verification: more numbers'
|
32
|
-
refute Iban.valid?('1GR9401406010601002001000246'), 'Invalid IBAN wrong verification: more numbers'
|
33
|
-
refute Iban.valid?('GR94014060106010020021000246'), 'Invalid IBAN wrong verification: more numbers'
|
34
|
-
refute Iban.valid?('GR94014060106010020010002462'), 'Invalid IBAN wrong verification: more numbers'
|
35
|
-
refute Iban.valid?('GR9401406010601002001000246 '), 'Invalid IBAN wrong verification: with spaceses'
|
36
|
-
refute Iban.valid?(' GR9401406010601002001000246'), 'Invalid IBAN wrong verification: with spaceses'
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_includes_letters_iban
|
40
|
-
refute Iban.valid?('GR94014060106010F2001000246'), 'Invalid IBAN wrong verification: with letters'
|
41
|
-
refute Iban.valid?('9401406010601002001000246GR'), 'Invalid IBAN wrong verification: with letters'
|
42
|
-
refute Iban.valid?('01406010601002001000246GR94'), 'Invalid IBAN wrong verification: with letters'
|
43
|
-
refute Iban.valid?('GRR901406010601002001000246'), 'Invalid IBAN wrong verification: with letters'
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
end
|