mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-04-05 18:09:04 +00:00
auth updates
This commit is contained in:
11
src/Core/API/API.Specs/Features/Auth.feature
Normal file
11
src/Core/API/API.Specs/Features/Auth.feature
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
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
|
||||
@@ -1,10 +1,10 @@
|
||||
Feature: NotFound API
|
||||
As a client of the API
|
||||
I want consistent 404 responses
|
||||
So that consumers can handle missing routes
|
||||
Feature: NotFound Responses
|
||||
As a client of the API
|
||||
I want consistent 404 responses
|
||||
So that consumers can gracefully handle missing routes
|
||||
|
||||
Scenario: GET error 404 returns NotFound message
|
||||
Given the API is running
|
||||
When I GET "/error/404"
|
||||
Then the response status code should be 404
|
||||
And the response JSON should have "message" equal "Route not found."
|
||||
Scenario: GET request to an invalid route returns 404
|
||||
Given the API is running
|
||||
When I send an HTTP request "GET" to "/invalid-route"
|
||||
Then the response has HTTP status 404
|
||||
And the response JSON should have "message" equal "Route not found."
|
||||
Reference in New Issue
Block a user