mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update tests for oauth -> strategy rename
This commit is contained in:
parent
72da7e6c54
commit
e13d410b4a
@ -100,14 +100,14 @@ describe("api auth middleware",function() {
|
|||||||
done();
|
done();
|
||||||
}});
|
}});
|
||||||
});
|
});
|
||||||
it("returns login details - oauth", function(done) {
|
it("returns login details - strategy", function(done) {
|
||||||
auth.init({settings:{adminAuth:{type:"oauth",strategy:{label:"test-oauth",icon:"test-icon"}}},log:{audit:function(){}}})
|
auth.init({settings:{adminAuth:{type:"strategy",strategy:{label:"test-strategy",icon:"test-icon"}}},log:{audit:function(){}}})
|
||||||
auth.login(null,{json: function(resp) {
|
auth.login(null,{json: function(resp) {
|
||||||
resp.should.have.a.property("type","oauth");
|
resp.should.have.a.property("type","strategy");
|
||||||
resp.should.have.a.property("prompts");
|
resp.should.have.a.property("prompts");
|
||||||
resp.prompts.should.have.a.lengthOf(1);
|
resp.prompts.should.have.a.lengthOf(1);
|
||||||
resp.prompts[0].should.have.a.property("type","button");
|
resp.prompts[0].should.have.a.property("type","button");
|
||||||
resp.prompts[0].should.have.a.property("label","test-oauth");
|
resp.prompts[0].should.have.a.property("label","test-strategy");
|
||||||
resp.prompts[0].should.have.a.property("icon","test-icon");
|
resp.prompts[0].should.have.a.property("icon","test-icon");
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
Loading…
Reference in New Issue
Block a user