add tests for login behaviour

This commit is contained in:
Aaron Po
2026-01-31 13:54:02 -05:00
parent 77bb1f6733
commit 9474fb7811
3 changed files with 30 additions and 36 deletions

View File

@@ -1,11 +1,12 @@
Feature: User Login
As a registered user
I want to log in to my account
So that I receive an authentication token to access authenticated routes
As a registered user
I want to log in to my account
So that I receive an authentication token to access authenticated routes
Scenario: Successful login with valid credentials
Given the API is running
And I have an existing account
And I submit a login request with a valid username and password
Then the system successfully authenticates the user
And returns a valid access token
And the response has HTTP status 200
And I submit a login request with a valid username and password
Then the response has HTTP status 200
And the response JSON should have "message" equal "Logged in successfully."
And the response JSON should have a valid access token.