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

When writing tests, how can I get data in session ? #900

Closed
nioperas06 opened this issue Jun 26, 2018 · 3 comments
Closed

When writing tests, how can I get data in session ? #900

nioperas06 opened this issue Jun 26, 2018 · 3 comments

Comments

@nioperas06
Copy link

Let's assume that in a controller I set data in my session. How can I get this data in my tests?

const { test, trait } = use('Test/Suite')('Post')

trait('Test/ApiClient')
trait('Session/Client')

test('get list of posts and session data ', async ({ client }) => {
  const response = await client
    .get('posts')
    .end()
// Test session data here
})
Thanks.

@nioperas06
Copy link
Author

Or something like assertcookie, assertsession 😕

@thetutlage
Copy link
Member

This issue was moved to adonisjs/vow#24

@lock
Copy link

lock bot commented Mar 11, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants