Skip to content

Commit

Permalink
Merge pull request #16 from amandastecz/tests/development
Browse files Browse the repository at this point in the history
Tests/development
  • Loading branch information
amandastecz committed Aug 28, 2023
2 parents 953bcdf + eae6c48 commit c7b05cc
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
source: "., !node_modules, !docker-compose.yml"
source: "., !node_modules, !docker-compose.yml, !ormconfig.json"
target: "~/rentapi"

- name: Update API
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,34 @@ To start the server and launch the application, use the following command:
yarn dev
```

With these steps completed, you'll have the RentAPI project running on your localhost, ready for exploration, testing, and development. Feel free to dive into the codebase and API documentation.
With these steps completed, you'll have the RentAPI project running on your localhost, ready for exploration, testing, and development. Feel free to dive into the codebase and API documentation.


# Running the tests locally
Run the following command to test:

```bash
yarn test
```

### Tests scenarios
- [x] [Accounts] should be able to authenticate an user
- [x] [Accounts] should not be able to authenticate a nonexistent user
- [x] [Accounts] should not be able to authenticate a user with wrong password
- [x] [Accounts] should be able to send forgot password mail to user
- [x] [Cars] should be able to create a new car
- [x] [Cars] should not to be able to create a car with an existent license plate
- [x] [Cars] should be able to create a new car with available true by default
- [x] [Cars] should not be able to add a new specification to a non-existent car
- [x] [Cars] should be able to add a new specification to an existent car
- [x] [Cars] should be able to create a new category
- [x] [Cars] should not be able to create a new category if already exists
- [x] [Cars] should be able to list all available cars
- [x] [Cars] should be able to list all available cars by name
- [x] [Cars] should be able to list all available cars by brand
- [x] [Cars] should be able to list all available cars by category_id
- [x] [Cars] should be able to list all categories
- [x] [Rentals] should be able to create a new rental
- [x] [Rentals] should not be able to create a new rental if there is another open to the same user
- [x] [Rentals] should not be able to create a new rental if there is another open to the same car
- [x] [Rentals] should not be able to create a new rental with invalid return time

0 comments on commit c7b05cc

Please sign in to comment.