Skip to content

Creates tests for the store manager api and its endpoints #1

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

Open
wants to merge 111 commits into
base: master
Choose a base branch
from

Conversation

calebrotich
Copy link
Owner

@calebrotich calebrotich commented Oct 19, 2018

What does this PR do?

This PR creates the endpoints and the tests for the store manager api

Description of Task to be completed:

Create the following minimum endpoints

Http Method Endpoint Functionality
POST api/v1/auth/signup Creates a new user account
POST api/v1/products Used by the admin to add a new product
POST api/v1/saleorder Used by the sale attendant to add a new sale order
GET api/v1/auth/signin Authentics and creates a token for the users
GET api/v1/products/<product_id> Enables a user to fetch a specific product
GET api/v1/saleorder/<sale_order_id> Enables a user to fetch a specific sale order
GET api/v1/products Enables a user to fetch all products
GET api/v1/saleorder Enables a user to fetch all sale orders

How to manually test

The application can be tested at Heroku in combination with postman
The base Url ishttps://store-manager-api.herokuapp.com/
Append the endpoints listed above to test them specifically
https://store-manager-api.herokuapp.com/api/v1/products , for example, tests POST/GET products

Any background information

Some of the endpoints requires Admin authentication

Relevant story

#161309750

This test ensures that the application is running as expected and that the application runs under the testing environment during tests
This is to eliminate the travis error which prevents the application from building successfully
Change the Travis CI badge from Image URL to markdown
The base test class file will be inherited by all the other test files
Rename the test file from a more generalized one to more specific name
Create a post endpoint for the admin to add a new product
Add docstrings and more descriptive function and variable names after the tests passed
@calebrotich calebrotich temporarily deployed to store-manager-api October 23, 2018 22:20 Inactive
All the details of the product are returned rather than just the name of the product
@calebrotich calebrotich temporarily deployed to store-manager-api October 24, 2018 05:18 Inactive
@calebrotich calebrotich temporarily deployed to store-manager-api October 24, 2018 12:09 Inactive
@calebrotich calebrotich temporarily deployed to store-manager-api October 25, 2018 20:57 Inactive
Transfer version 2 of the application to the repository store-manager-api-v2
@calebrotich calebrotich temporarily deployed to store-manager-api October 26, 2018 18:18 Inactive
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

Successfully merging this pull request may close these issues.

1 participant