michielbdejong/solid-panes

View on GitHub
src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap

Summary

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

exports[`getStatementsToAdd should return all required statements to add the given permissions for a given origin 1`] = `
Array [
  Statement {
    "object": BlankNode {
      "id": "bn_mock_app_id",
      "termType": "BlankNode",
      "value": "bn_mock_app_id",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#trustedApp",
    },
    "subject": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example#me",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example",
    },
  },
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "https://origin.example",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#origin",
    },
    "subject": BlankNode {
      "id": "bn_mock_app_id",
      "termType": "BlankNode",
      "value": "bn_mock_app_id",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example",
    },
  },
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#Read",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#mode",
    },
    "subject": BlankNode {
      "id": "bn_mock_app_id",
      "termType": "BlankNode",
      "value": "bn_mock_app_id",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example",
    },
  },
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#Write",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#mode",
    },
    "subject": BlankNode {
      "id": "bn_mock_app_id",
      "termType": "BlankNode",
      "value": "bn_mock_app_id",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example",
    },
  },
]
`;

exports[`getStatementsToDelete should return all statements for the given origin 1`] = `
Array [
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "https://app.example",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#trustedApp",
    },
    "subject": NamedNode {
      "termType": "NamedNode",
      "value": "https://profile.example#me",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "chrome:theSession",
    },
  },
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "https://origin.example",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#origin",
    },
    "subject": NamedNode {
      "termType": "NamedNode",
      "value": "https://app.example",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "chrome:theSession",
    },
  },
  Statement {
    "object": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#Read",
    },
    "predicate": NamedNode {
      "termType": "NamedNode",
      "value": "http://www.w3.org/ns/auth/acl#mode",
    },
    "subject": NamedNode {
      "termType": "NamedNode",
      "value": "https://app.example",
    },
    "why": NamedNode {
      "termType": "NamedNode",
      "value": "chrome:theSession",
    },
  },
]
`;