Skip to content
Browse files

test apache accounts

  • Loading branch information...
1 parent 42aadf9 commit bf148a9e0799a4fc013523f64954ef380fc05565 @grahamb grahamb committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 test.js
View
6 test.js
@@ -30,7 +30,7 @@ prompt.start();
prompt.get(prompts, function(err, result) {
request.post({
uri: cas.options.casHost + cas.options.casBasePath + '/tickets',
- body: 'username=' + result.username + '&password=' + result.password + '&service=' + cas.options.service + '&allow=' + cas.options.allow
+ body: 'username=' + result.username + '&password=' + result.password + '&service=' + cas.options.service + '&allow=sfu'
}, function(err, response, body) {
assert.equal(response.statusCode, 201);
var ticketurl = cas.options.casHost + response.headers.location;
@@ -59,7 +59,9 @@ prompt.get(prompts, function(err, result) {
assert.equal(response.statusCode, 200);
cas.validate(ticket, function(err, loggedIn, casResponse) {
assert(loggedIn);
- assert.equal(casResponse.user, 'myfakeuser');
+ cas.authenticateApacheUser(casResponse, function(err, loggedIn, casResponse) {
+ assert(loggedIn);
+ });
});
});
});

0 comments on commit bf148a9

Please sign in to comment.
Something went wrong with that request. Please try again.