OSDN Git Service
(root)
/
newslash
/
newslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24c55db
)
Util::Test: create_user can take passwd argument
author
hylom
<hylom@users.sourceforge.jp>
Fri, 31 Mar 2017 11:10:39 +0000
(20:10 +0900)
committer
hylom
<hylom@users.sourceforge.jp>
Fri, 31 Mar 2017 11:10:39 +0000
(20:10 +0900)
src/newslash_web/lib/Newslash/Util/Test.pm
patch
|
blob
|
history
diff --git
a/src/newslash_web/lib/Newslash/Util/Test.pm
b/src/newslash_web/lib/Newslash/Util/Test.pm
index
872a6f6
..
3a0e579
100644
(file)
--- a/
src/newslash_web/lib/Newslash/Util/Test.pm
+++ b/
src/newslash_web/lib/Newslash/Util/Test.pm
@@
-52,9
+52,9
@@
user hashref
=cut
sub create_user {
- my ($app, $user_name) = @_;
+ my ($app, $user_name
, $passwd
) = @_;
my $users = $app->model('users');
-
my $passwd
= $users->generate_random_password;
+
$passwd ||
= $users->generate_random_password;
my $uid = $users->create($user_name, $user_name . '@example.com', $passwd);
my $user;
if ($uid) {