huridocs/uwazi

View on GitHub
app/api/thesauri/specs/__snapshots__/routes.old.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`thesauri routes DELETE should have a validation schema 1`] = `
Object {
  "properties": Object {
    "query": Object {
      "properties": Object {
        "_id": Object {
          "type": "string",
        },
        "_rev": Object {
          "type": "string",
        },
      },
      "required": Array [
        "_id",
      ],
      "type": "object",
    },
  },
  "required": Array [
    "query",
  ],
  "type": "object",
}
`;

exports[`thesauri routes GET dictionaries should have a validation schema 1`] = `
Object {
  "properties": Object {
    "query": Object {
      "properties": Object {
        "_id": Object {
          "type": "string",
        },
      },
      "type": "object",
    },
  },
  "required": Array [
    "query",
  ],
  "type": "object",
}
`;

exports[`thesauri routes GET should have a validation schema 1`] = `
Object {
  "properties": Object {
    "query": Object {
      "properties": Object {
        "_id": Object {
          "type": "string",
        },
      },
      "type": "object",
    },
  },
  "required": Array [
    "query",
  ],
  "type": "object",
}
`;

exports[`thesauri routes POST should have a validation schema 1`] = `
Object {
  "properties": Object {
    "body": Object {
      "anyOf": Array [
        Object {
          "properties": Object {
            "__v": Object {
              "type": "number",
            },
            "_id": Object {
              "type": "string",
            },
            "enable_classification": Object {
              "type": "boolean",
            },
            "name": Object {
              "type": "string",
            },
            "values": Object {
              "items": Object {
                "properties": Object {
                  "_id": Object {
                    "type": "string",
                  },
                  "id": Object {
                    "type": "string",
                  },
                  "label": Object {
                    "type": "string",
                  },
                  "values": Object {
                    "items": Object {
                      "type": "object",
                    },
                    "type": "array",
                  },
                },
                "required": Array [
                  "label",
                ],
                "type": "object",
              },
              "type": "array",
            },
          },
          "required": Array [
            "name",
            "values",
          ],
          "type": "object",
        },
        Object {
          "properties": Object {
            "thesauri": Object {
              "type": "string",
            },
          },
          "required": Array [
            "thesauri",
          ],
          "type": "object",
        },
      ],
    },
  },
  "required": Array [
    "body",
  ],
  "type": "object",
}
`;