i am using frisby for apis automation and Jasmine for test. I am not able to generate simple token generation using basic Auth
this is how my curl call look like for token generation and same I am trying with Frisby.js.
$ curl -k https://URL -u username:password -H "header:value"
The output brings token like some value
TDIKhjglj7698ssjgljuypubvbi
Same I am doing with frisby to generate token so in this case I am not getting error and my spec is getting passed everytime. Even for negative expects conditions. here is my code
var frisby =require('frisby');
frisby.globalSetup({
request: {
headers: {
'Authorization': 'Basic ' + Buffer.from("username:password").toString('base64'),
'Content-Type': 'application/json+scim',
'header':'value'
}} });
//do setup for Authorization of the token for REST call
it ('uses globalSetup for every test after it is called', function () {
`return frisby
.get('URL')`
` .inspectResponse()`
.expect('status', 400),`
{ strictSSL: false }`
});`
can anyone just point out what exactly am I missing in code. I have tested with response 400 still test is getting passed and token not getting generated. I am using link Frisby Documentation
Also running test using -
#jasmine test_spec.js
Randomized with seed 54594
Started
1 spec, 0 failures
Finished in 0.049 seconds
Randomized with seed 54594 (jasmine --random=true --seed=54594)
i am using frisby for apis automation and Jasmine for test. I am not able to generate simple token generation using basic Auth
this is how my curl call look like for token generation and same I am trying with Frisby.js.
$ curl -k https://URL -u username:password -H "header:value"The output brings token like some value
TDIKhjglj7698ssjgljuypubvbiSame I am doing with frisby to generate token so in this case I am not getting error and my spec is getting passed everytime. Even for negative expects conditions. here is my code
var frisby =require('frisby');frisby.globalSetup({request: {headers: {'Authorization': 'Basic ' + Buffer.from("username:password").toString('base64'),'Content-Type': 'application/json+scim','header':'value'}} });//do setup for Authorization of the token for REST callit ('uses globalSetup for every test after it is called', function () {can anyone just point out what exactly am I missing in code. I have tested with response 400 still test is getting passed and token not getting generated. I am using link Frisby Documentation
Also running test using -
#jasmine test_spec.jsRandomized with seed 54594Started1 spec, 0 failuresFinished in 0.049 secondsRandomized with seed 54594 (jasmine --random=true --seed=54594)