Commit 6a79baab authored by Nigel Kukard's avatar Nigel Kukard

Added unit test for reply attributes

parent 893bc2f4
......@@ -181,6 +181,11 @@ if ($child = fork()) {
$user1_ID,'User-Password','==','test123'
);
my $user1attr2_ID = testDBInsert("Create user 'testuser1' attribute 'Framed-IP-Address'",
"INSERT INTO user_attributes (UserID,Name,Operator,Value,Disabled) VALUES (?,?,?,?,0)",
$user1_ID,'Framed-IP-Address',':=','10.0.0.1'
);
$res = smradius::client->run(
"--raddb","dicts",
"127.0.0.1",
......@@ -191,6 +196,7 @@ if ($child = fork()) {
);
is(ref($res),"HASH","smradclient should return a HASH");
is($res->{'response'}->{'code'},"Access-Accept","Check our return is 'Access-Accept' for bare user blank '' realm");
is($res->{'response'}->{'attributes'}->{'Framed-IP-Address'},"10.0.0.1","Check that an attribute is replied with if setup");
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment