// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Transfer > split transfers are retained on child transactions 1`] = `
[
  {
    "account": "one",
    "amount": 5000,
    "category": null,
    "cleared": 1,
    "date": 20170101,
    "error": null,
    "id": "id5",
    "imported_id": null,
    "imported_payee": null,
    "is_child": 0,
    "is_parent": 0,
    "notes": null,
    "parent_id": null,
    "payee": "id3",
    "payee_name": "",
    "raw_synced_data": null,
    "reconciled": 0,
    "schedule": null,
    "sort_order": 123456789,
    "starting_balance_flag": 0,
    "tombstone": 0,
    "transfer_id": "id6",
  },
  {
    "account": "two",
    "amount": -5000,
    "category": null,
    "cleared": 0,
    "date": 20170101,
    "error": null,
    "id": "id6",
    "imported_id": null,
    "imported_payee": null,
    "is_child": 0,
    "is_parent": 0,
    "notes": null,
    "parent_id": null,
    "payee": "id2",
    "payee_name": "",
    "raw_synced_data": null,
    "reconciled": 0,
    "schedule": null,
    "sort_order": 123456789,
    "starting_balance_flag": 0,
    "tombstone": 0,
    "transfer_id": "id5",
  },
]
`;

exports[`Transfer > split transfers are retained on child transactions 2`] = `
"- First value
+ Second value

@@ -8,11 +8,11 @@
      "error": null,
      "id": "id5",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
-     "is_parent": 0,
+     "is_parent": 1,
      "notes": null,
      "parent_id": null,
      "payee": "id3",
      "payee_name": "",
      "raw_synced_data": null,"
`;

exports[`Transfer > split transfers are retained on child transactions 3`] = `
"- First value
+ Second value

@@ -22,10 +22,58 @@
      "starting_balance_flag": 0,
      "tombstone": 0,
      "transfer_id": "id6",
    },
    Object {
+     "account": "one",
+     "amount": 2000,
+     "category": null,
+     "cleared": 1,
+     "date": 20170101,
+     "error": null,
+     "id": "id7",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 1,
+     "is_parent": 0,
+     "notes": null,
+     "parent_id": "id5",
+     "payee": "id2",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id8",
+   },
+   Object {
+     "account": "one",
+     "amount": -2000,
+     "category": null,
+     "cleared": 0,
+     "date": 20170101,
+     "error": null,
+     "id": "id8",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 0,
+     "is_parent": 0,
+     "notes": null,
+     "parent_id": null,
+     "payee": "id2",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id7",
+   },
+   Object {
      "account": "two",
      "amount": -5000,
      "category": null,
      "cleared": 0,
      "date": 20170101,"
`;

exports[`Transfer > transfers are properly de-categorized 1`] = `
[
  {
    "account": "one",
    "amount": 5000,
    "category": "1",
    "cleared": 1,
    "date": 20170101,
    "error": null,
    "id": "id6",
    "imported_id": null,
    "imported_payee": null,
    "is_child": 0,
    "is_parent": 0,
    "notes": null,
    "parent_id": null,
    "payee": "id5",
    "payee_name": "Non-transfer",
    "raw_synced_data": null,
    "reconciled": 0,
    "schedule": null,
    "sort_order": 123456789,
    "starting_balance_flag": 0,
    "tombstone": 0,
    "transfer_id": null,
  },
]
`;

exports[`Transfer > transfers are properly de-categorized 2`] = `
"- First value
+ Second value

@@ -9,18 +9,42 @@
      "id": "id6",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
-     "notes": null,
+     "notes": "hi",
      "parent_id": null,
-     "payee": "id5",
-     "payee_name": "Non-transfer",
+     "payee": "id4",
+     "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": null,
+     "transfer_id": "id7",
+   },
+   Object {
+     "account": "three",
+     "amount": -5000,
+     "category": null,
+     "cleared": 0,
+     "date": 20170101,
+     "error": null,
+     "id": "id7",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 0,
+     "is_parent": 0,
+     "notes": "hi",
+     "parent_id": null,
+     "payee": "id2",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id6",
    },
  ]"
`;

exports[`Transfer > transfers are properly de-categorized 3`] = `
"- First value
+ Second value

@@ -1,32 +1,32 @@
  Array [
    Object {
      "account": "one",
      "amount": 5000,
-     "category": "1",
+     "category": null,
      "cleared": 1,
      "date": 20170101,
      "error": null,
      "id": "id6",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
      "notes": "hi",
      "parent_id": null,
-     "payee": "id4",
+     "payee": "id3",
      "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
      "transfer_id": "id7",
    },
    Object {
-     "account": "three",
+     "account": "two",
      "amount": -5000,
      "category": null,
      "cleared": 0,
      "date": 20170101,
      "error": null,"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 1`] = `
[
  {
    "account": "one",
    "amount": 5000,
    "category": null,
    "cleared": 1,
    "date": 20170101,
    "error": null,
    "id": "id6",
    "imported_id": null,
    "imported_payee": null,
    "is_child": 0,
    "is_parent": 0,
    "notes": null,
    "parent_id": null,
    "payee": "id5",
    "payee_name": "Non-transfer",
    "raw_synced_data": null,
    "reconciled": 0,
    "schedule": null,
    "sort_order": 123456789,
    "starting_balance_flag": 0,
    "tombstone": 0,
    "transfer_id": null,
  },
]
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 2`] = `
"- First value
+ Second value

@@ -21,6 +21,54 @@
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
      "transfer_id": null,
    },
+   Object {
+     "account": "one",
+     "amount": 5000,
+     "category": null,
+     "cleared": 1,
+     "date": 20170101,
+     "error": null,
+     "id": "id7",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 0,
+     "is_parent": 0,
+     "notes": null,
+     "parent_id": null,
+     "payee": "id3",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id8",
+   },
+   Object {
+     "account": "two",
+     "amount": -5000,
+     "category": null,
+     "cleared": 0,
+     "date": 20170101,
+     "error": null,
+     "id": "id8",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 0,
+     "is_parent": 0,
+     "notes": null,
+     "parent_id": null,
+     "payee": "id2",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id7",
+   },
  ]"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 3`] = `
"- First value
+ Second value

@@ -2,73 +2,73 @@
    Object {
      "account": "one",
      "amount": 5000,
      "category": null,
      "cleared": 1,
-     "date": 20170101,
+     "date": 20170105,
      "error": null,
-     "id": "id6",
+     "id": "id7",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
-     "notes": null,
+     "notes": "This is a note",
      "parent_id": null,
-     "payee": "id5",
-     "payee_name": "Non-transfer",
+     "payee": "id3",
+     "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": null,
+     "transfer_id": "id8",
    },
    Object {
-     "account": "one",
-     "amount": 5000,
+     "account": "two",
+     "amount": -5000,
      "category": null,
-     "cleared": 1,
-     "date": 20170101,
+     "cleared": 0,
+     "date": 20170105,
      "error": null,
-     "id": "id7",
+     "id": "id8",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
-     "notes": null,
+     "notes": "This is a note",
      "parent_id": null,
-     "payee": "id3",
+     "payee": "id2",
      "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": "id8",
+     "transfer_id": "id7",
    },
    Object {
-     "account": "two",
-     "amount": -5000,
+     "account": "one",
+     "amount": 5000,
      "category": null,
-     "cleared": 0,
+     "cleared": 1,
      "date": 20170101,
      "error": null,
-     "id": "id8",
+     "id": "id6",
      "imported_id": null,
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
      "notes": null,
      "parent_id": null,
-     "payee": "id2",
-     "payee_name": "",
+     "payee": "id5",
+     "payee_name": "Non-transfer",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": "id7",
+     "transfer_id": null,
    },
  ]"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 4`] = `
"- First value
+ Second value

@@ -11,22 +11,22 @@
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
      "notes": "This is a note",
      "parent_id": null,
-     "payee": "id3",
+     "payee": "id4",
      "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
      "transfer_id": "id8",
    },
    Object {
-     "account": "two",
+     "account": "three",
      "amount": -5000,
      "category": null,
      "cleared": 0,
      "date": 20170105,
      "error": null,"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 5`] = `
"- First value
+ Second value

@@ -11,43 +11,19 @@
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
      "notes": "This is a note",
      "parent_id": null,
-     "payee": "id4",
-     "payee_name": "",
+     "payee": "id9",
+     "payee_name": "Not transferred anymore",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": "id8",
-   },
-   Object {
-     "account": "three",
-     "amount": -5000,
-     "category": null,
-     "cleared": 0,
-     "date": 20170105,
-     "error": null,
-     "id": "id8",
-     "imported_id": null,
-     "imported_payee": null,
-     "is_child": 0,
-     "is_parent": 0,
-     "notes": "This is a note",
-     "parent_id": null,
-     "payee": "id2",
-     "payee_name": "",
-     "raw_synced_data": null,
-     "reconciled": 0,
-     "schedule": null,
-     "sort_order": 123456789,
-     "starting_balance_flag": 0,
-     "tombstone": 0,
-     "transfer_id": "id7",
+     "transfer_id": null,
    },
    Object {
      "account": "one",
      "amount": 5000,
      "category": null,"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 6`] = `
"- First value
+ Second value

@@ -11,19 +11,43 @@
      "imported_payee": null,
      "is_child": 0,
      "is_parent": 0,
      "notes": "This is a note",
      "parent_id": null,
-     "payee": "id9",
-     "payee_name": "Not transferred anymore",
+     "payee": "id3",
+     "payee_name": "",
      "raw_synced_data": null,
      "reconciled": 0,
      "schedule": null,
      "sort_order": 123456789,
      "starting_balance_flag": 0,
      "tombstone": 0,
-     "transfer_id": null,
+     "transfer_id": "id10",
+   },
+   Object {
+     "account": "two",
+     "amount": -5000,
+     "category": null,
+     "cleared": 0,
+     "date": 20170105,
+     "error": null,
+     "id": "id10",
+     "imported_id": null,
+     "imported_payee": null,
+     "is_child": 0,
+     "is_parent": 0,
+     "notes": "This is a note",
+     "parent_id": null,
+     "payee": "id2",
+     "payee_name": "",
+     "raw_synced_data": null,
+     "reconciled": 0,
+     "schedule": null,
+     "sort_order": 123456789,
+     "starting_balance_flag": 0,
+     "tombstone": 0,
+     "transfer_id": "id7",
    },
    Object {
      "account": "one",
      "amount": 5000,
      "category": null,"
`;

exports[`Transfer > transfers are properly inserted/updated/deleted 7`] = `
"- First value
+ Second value

@@ -2,58 +2,10 @@
    Object {
      "account": "one",
      "amount": 5000,
      "category": null,
      "cleared": 1,
-     "date": 20170105,
-     "error": null,
-     "id": "id7",
-     "imported_id": null,
-     "imported_payee": null,
-     "is_child": 0,
-     "is_parent": 0,
-     "notes": "This is a note",
-     "parent_id": null,
-     "payee": "id3",
-     "payee_name": "",
-     "raw_synced_data": null,
-     "reconciled": 0,
-     "schedule": null,
-     "sort_order": 123456789,
-     "starting_balance_flag": 0,
-     "tombstone": 0,
-     "transfer_id": "id10",
-   },
-   Object {
-     "account": "two",
-     "amount": -5000,
-     "category": null,
-     "cleared": 0,
-     "date": 20170105,
-     "error": null,
-     "id": "id10",
-     "imported_id": null,
-     "imported_payee": null,
-     "is_child": 0,
-     "is_parent": 0,
-     "notes": "This is a note",
-     "parent_id": null,
-     "payee": "id2",
-     "payee_name": "",
-     "raw_synced_data": null,
-     "reconciled": 0,
-     "schedule": null,
-     "sort_order": 123456789,
-     "starting_balance_flag": 0,
-     "tombstone": 0,
-     "transfer_id": "id7",
-   },
-   Object {
-     "account": "one",
-     "amount": 5000,
-     "category": null,
-     "cleared": 1,
      "date": 20170101,
      "error": null,
      "id": "id6",
      "imported_id": null,
      "imported_payee": null,"
`;
