at Context. (test/notions-endpoints.spec.js:94:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ ] 2) Notions Endpoints
GET /api/notions
given a malicious notion
"before each" hook for "removes the attack content":
error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign"
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) Notions Endpoints
GET /api/notions/notion-types
given a malicious notion type
"before each" hook for "removes the attack content":
error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign"
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)
[ ] 4) Notions Endpoints
GET /api/notions/:notion_id
when the notion with id notion_id exists
returns the notion with id notion_id:
[ ] 1) Notions Endpoints GET /api/notions when there are notions in the database returns 200 and all the notions:
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/notions-endpoints.spec.js:94:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ ] 2) Notions Endpoints GET /api/notions given a malicious notion "before each" hook for "removes the attack content": error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign" 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) Notions Endpoints GET /api/notions/notion-types given a malicious notion type "before each" hook for "removes the attack content": error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign" 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)
[ ] 4) Notions Endpoints GET /api/notions/:notion_id when the notion with id notion_id exists returns the notion with id notion_id:
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/notions-endpoints.spec.js:178:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ ] 5) Notions Endpoints GET /api/notions/:notion_id given a malicious notion "before each" hook for "removes the attack content": error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign" 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)
[ ] 6) Notions Endpoints GET /api/notions/:notion_id/certifications given a malicious certification "before each" hook for "removes the attack content": error: insert into "notions" ("approved_by_admin", "brand_id", "created_at", "id", "manufacturer_country", "manufacturer_id", "manufacturer_notes", "material_notes", "material_origin_id", "material_producer_id", "material_type_id", "notion_type_id", "updated_at") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) - insert or update on table "notions" violates foreign key constraint "notions_brand_id_foreign" 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)
[ ] 7) Notions Endpoints POST /api/notions creates a new notion, returning 201 and the new notion:
AssertionError: expected 400 to deeply equal 201
expected - actual
-400 +201
at Context. (test/notions-endpoints.spec.js:464:44)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)