diff --git a/back-end/tests/test.js b/back-end/tests/test.js
index 38c9c27..bfff353 100644
--- a/back-end/tests/test.js
+++ b/back-end/tests/test.js
@@ -22,6 +22,7 @@ describe('Name', () => {
*/
describe("Login & Signup", () => {
+
// successful login - TODO : failing
describe("Successful login of an existing user", () => {
it("should log in existing user", (done) => {
@@ -104,7 +105,7 @@ describe("Book Routes", () => {
});
});
-describe("Friends", () => {
+describe("Friends Routes", () => {
describe("Friend Shelf Route", () => {
it("should display friends", (done) => {
chai
@@ -131,3 +132,32 @@ describe("Friends", () => {
// });
// });
});
+
+describe("User Routes", () => {
+ describe ("Gets all users", () => {
+ it("should get all users", (done) => {
+ chai
+ .request(app)
+ .get("/users")
+ .send()
+ .end((err, res) => {
+ expect(res).to.have.status(200);
+ expect(res.body).to.be.an("array");
+ done();
+ });
+ });
+ });
+
+ describe("Gets users by their id", () => {
+ it("should get user by their id", (done) => {
+ chai
+ .request(app)
+ .get("/users/1")
+ .end((err, res) => {
+ expect(res).to.have.status(200);
+ expect(res.body).to.be.an("object");
+ done();
+ });
+ });
+ });
+});
\ No newline at end of file
diff --git a/front-end/src/pages/BookSearch.js b/front-end/src/pages/BookSearch.js
index 030c06f..476bc0f 100644
--- a/front-end/src/pages/BookSearch.js
+++ b/front-end/src/pages/BookSearch.js
@@ -9,8 +9,7 @@ const BookSearchPage = ({ onSearch }) => {
const handleSearch = (searchTerm) => {
-
- // Call the API to search for books
+ // Call the API to search for books
const searchUrl =`http://localhost:3001/books/${searchTerm}`;
fetch(searchUrl)
.then((response) => response.json())
@@ -30,12 +29,7 @@ const BookSearchPage = ({ onSearch }) => {