Tag: 超级用户

在摩卡和SuperTest中设置基本身份validation

我试图设置一个testing,以validation用户名和密码的基本身份validation阻止的path的用户名和密码。 it('should receive a status code of 200 with login', function(done) { request(url) .get("/staging") .expect(200) .set('Authorization', 'Basic username:password') .end(function(err, res) { if (err) { throw err; } done(); }); });