Skip to content

Write unit tests #4

@amitguptagwl

Description

@amitguptagwl

Following cases are tested manually. Need to write unit tests for auto-testing.

Scenarios
auto-create: on

  • [DONE] Cookies are sent to the client
  • Client can send the session-id to the server either in header or cookies
  • Cookies are not created for all the routes but selected : not implemented yet
  • [DONE] When user makes request without cookies : create new
  • [DONE] When user makes request with expired cookies : create new
  • [DONE] When user makes request with about to expire cookies : renew
  • [DONE] When user makes request with invalid session-id : create new

auto-create: off

  • [DONE] When user makes request with invalid session-id : error
  • [DONE] When user makes request for secure page without cookies : redirect to login page
  • [DONE] When user makes request for secure page with cookies : do nothing
  • [DONE] When user makes request for secure page with expired cookies : redirect to login page
  • [DONE] When user makes request for secure page with about to expire cookies : renew cookies

check session_test.js for more detail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    first-timers-onlyThis issue is suitable for first timers. However, can be picked by any contributorsgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions