Add a method that returns the regexp used to validate generated GUIDs. This should
prevent the regexp from proliferating all through tests and code. Also, add a test for the method, which just checks that it returns a regexp.
This commit is contained in:
parent
f56c0873d8
commit
fca9e9c633
2 changed files with 19 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ my @testSets = (
|
|||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
plan tests => scalar(@testSets) + 4;
|
||||
plan tests => scalar(@testSets) + 5;
|
||||
|
||||
# generate
|
||||
my $generateId = $session->id->generate();
|
||||
|
|
@ -79,3 +79,6 @@ foreach my $testSet (@testSets) {
|
|||
#
|
||||
|
||||
is($session->id->toHex('wjabZsKOb7kBBSiO3bQwzA'), 'c2369b66c28e6fb90105288eddb430cc', 'toHex works');
|
||||
|
||||
my $re = $session->id->getValidator;
|
||||
is( ref $re, 'Regexp', 'getValidator returns a regexp object');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue