[ ] 1) Brands Endpoints
GET /api/brands/:brand_id/fibers
given there are fibers for the brand with id brand_id
responds with 200 and all of the fibers for the brand:
Error: expected 200 "OK", got 404 "Not Found"
at Context. (test/brands-endpoints.spec.js:160:22)
at process.processImmediate (node:internal/timers:478:21)
at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
at /Users/Georgia/software_engineering_projects/veronaut-products-api/node_modules/supertest/lib/test.js:308:13
at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
at Test.assert (node_modules/supertest/lib/test.js:164:23)
at Server.localAssert (node_modules/supertest/lib/test.js:120:14)
at Object.onceWrapper (node:events:633:28)
at Server.emit (node:events:519:28)
at emitCloseNT (node:net:2279:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
[ ] 2) Brands Endpoints
GET /api/brands/:brand_id/fibers
given there are no fibers for the brand with id brand_id
"before each" hook: insert brands for "responds with 200 and an empty list":
error: insert into "brands" ("approved_by_admin", "created_at", "english_name", "home_currency", "id", "size_system", "updated_at", "website") values ($1, $2, $3, $4, $5, $6, $7, $8) - duplicate key value violates unique constraint "brands_pkey"
at Parser.parseErrorMessage (node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (node_modules/pg-protocol/dist/parser.js:39:38)
at Socket. (node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
[ ] 3) Brands Endpoints
GET /api/brands/:brand_id/fibers
given a malicious fiber
"before each" hook for "removes the attack content":
ReferenceError: malFactInsert is not defined
at Context. (test/brands-endpoints.spec.js:184:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ ] 4) Brands Endpoints
GET /api/brands/:brand_id/notions
given there are notions for the brand with id brand_id
GET /api/brands/:brand_id/notions responds with 200 and all of the notions for the brand:
at Context. (test/brands-endpoints.spec.js:213:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at /Users/Georgia/software_engineering_projects/veronaut-products-api/test/brands-endpoints.spec.js:214:45
at /Users/Georgia/software_engineering_projects/veronaut-products-api/node_modules/supertest/lib/test.js:308:13
at Test._assertFunction (node_modules/supertest/lib/test.js:285:13)
at Test.assert (node_modules/supertest/lib/test.js:164:23)
at Server.localAssert (node_modules/supertest/lib/test.js:120:14)
at Object.onceWrapper (node:events:633:28)
at Server.emit (node:events:519:28)
at emitCloseNT (node:net:2279:8)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
[ ] 5) "before each" hook for "responds with 200 and an empty array":
error: insert into "brands" ("approved_by_admin", "created_at", "english_name", "home_currency", "id", "size_system", "updated_at", "website") values ($1, $2, $3, $4, $5, $6, $7, $8) - duplicate key value violates unique constraint "brands_pkey"
at Parser.parseErrorMessage (node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (node_modules/pg-protocol/dist/parser.js:39:38)
at Socket. (node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
[ ] 1) Brands Endpoints GET /api/brands/:brand_id/fibers given there are fibers for the brand with id brand_id responds with 200 and all of the fibers for the brand: Error: expected 200 "OK", got 404 "Not Found" at Context. (test/brands-endpoints.spec.js:160:22)
at process.processImmediate (node:internal/timers:478:21)
at Test._assertStatus (node_modules/supertest/lib/test.js:252:14) at /Users/Georgia/software_engineering_projects/veronaut-products-api/node_modules/supertest/lib/test.js:308:13 at Test._assertFunction (node_modules/supertest/lib/test.js:285:13) at Test.assert (node_modules/supertest/lib/test.js:164:23) at Server.localAssert (node_modules/supertest/lib/test.js:120:14) at Object.onceWrapper (node:events:633:28) at Server.emit (node:events:519:28) at emitCloseNT (node:net:2279:8) at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
[ ] 3) Brands Endpoints GET /api/brands/:brand_id/fibers given a malicious fiber "before each" hook for "removes the attack content": ReferenceError: malFactInsert is not defined at Context. (test/brands-endpoints.spec.js:184:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ ] 4) Brands Endpoints GET /api/brands/:brand_id/notions given there are notions for the brand with id brand_id GET /api/brands/:brand_id/notions responds with 200 and all of the notions for the brand:
AssertionError: expected [ { id: 1, notion_type_id: 1, …(12) } ] to deeply equal [ { notion_type_id: 1, …(14) } ]
expected - actual
"manufacturer_notes": "Pink factory" "material_notes": "Notes" "material_origin_id": 1 "material_producer_id": 1
"material_type": "Cotton" "material_type_id": 1 "notion_type": "button" "notion_type_id": 1 "updated_at": "2020-09-13T07:30:51.564Z"
at Context. (test/brands-endpoints.spec.js:213:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at /Users/Georgia/software_engineering_projects/veronaut-products-api/test/brands-endpoints.spec.js:214:45 at /Users/Georgia/software_engineering_projects/veronaut-products-api/node_modules/supertest/lib/test.js:308:13 at Test._assertFunction (node_modules/supertest/lib/test.js:285:13) at Test.assert (node_modules/supertest/lib/test.js:164:23) at Server.localAssert (node_modules/supertest/lib/test.js:120:14) at Object.onceWrapper (node:events:633:28) at Server.emit (node:events:519:28) at emitCloseNT (node:net:2279:8) at process.processTicksAndRejections (node:internal/process/task_queues:81:21)