Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create multiple cookie with single file #72

Closed
moses-gangipogu opened this issue Feb 25, 2014 · 0 comments
Closed

create multiple cookie with single file #72

moses-gangipogu opened this issue Feb 25, 2014 · 0 comments

Comments

@moses-gangipogu
Copy link

how can i create multiple cookies with a single file
i have to just merge this two file into one single file
to test it for both valid and invalid cookie
how can i achieve this

///first file
// valid cookie
////////valid_spec.js

var frisby = require('./lib/frisby');
    // Global setup for all tests
    frisby.globalSetup({
      request: {
        headers:{'Accept': 'application/json,  application/x-httpd-php', 'Cookie': 'authenticationToken=5363; activationID=1'}
  },
      timeout: (30 * 1000)
});


    /**
    * Tests -> GET
    */
    frisby.create(' ')
    .get('http://xyz/auto?limit=0')
    .expectStatus(200)
    .expectHeaderContains('content-type', 'application/json')
    .expectJSON('status',{
    message: "SUCCESS",
    code: 1
  })
.toss(); 

//second file
// INVALID cookie
////////////// invalid_spec.js

var frisby = require('./lib/frisby');

    // Global setup for all tests
    frisby.globalSetup({
      request: {
        headers:{'Accept': 'application/json,  application/x-httpd-php', 'Cookie': 'authenticationToken=5363; activationID=11123fgf'}
  },
      timeout: (30 * 1000)
});


    /**
    * Tests -> GET
    */
    frisby.create(' ')
    .get('http://xyz/auto?limit=0')
    .expectStatus(200)
    .expectHeaderContains('content-type', 'application/json')
    .expectJSON('status',{
    message: "DATABASE_ERROR",
    code: 2
  })
.toss(); 

any answers please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant