Skip to content

Could not generate token using frisby v2 #561

Description

@G4gan

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions