summaryrefslogtreecommitdiff
path: root/fs_selfservice/fs_passwd_test
blob: 4f8b8a888ea8e819ecfd0b2bda28ef1cadf54562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w

use strict;
use FS::SelfService qw(passwd);

my $rv = passwd(
  'username' => 'ivan',
  'old_password' => 'heyhoo',
  'new_password' => 'haloo',
);
my $error = $rv->{error};

if ( $error eq 'Incorrect password.' ) {
  exit;
} else {
  die $error if $error;
  die "no error";
}