Skip to content

mlouellette/Testing-And-TDD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing-And-TDD

Description

This project focuses on testing and Test-Driven Development (TDD) using Ruby on Rails. The application's tests are designed to enforce the database schema restrictions and ensure proper validation of the seed data entered. By implementing rigorous testing practices, the application aims to maintain data integrity and safeguard against potential issues.

Controllers

This project includes the following controllers and routes for the API:

  • AuthController: Handles user authentication.
  • OrdersController: Manages orders and their statuses.
  • ProductsController: Handles product-related operations.
  • RestaurantsController: Manages restaurants and their information.

Getting Started

  • Dependencies

    bundle install

  • Migrate the database:

    rails db:migrate

  • Run the server:

    rails server

API Routes

The API provides the following routes:

  • POST /api/login: Authenticates a user.
  • POST /api/order/:id/status: Sets the status of an order.
  • GET /api/restaurants: Retrieves a list of restaurants.
  • GET /api/products: Retrieves a list of products.
  • For more details about the API routes, refer to the config/routes.rb file.

Testing and TDD

To run the tests, use the following command: rails test

Database Diagram

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages