aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-04-27 12:26:17 +0300
committerHenry Jameson <me@hjkos.com>2019-04-27 12:26:17 +0300
commite0247e21f6fad72481d8f04271d3a15e0d827acc (patch)
treeacc8a11074865a9cbdc50e9b52da918c48f7235e /test
parent2b5cf61a8f9a84467495721f170df7ae1288959b (diff)
parent9e2fa50b74eb83e3c3eadb9a68d24ddaa1d9da48 (diff)
Merge remote-tracking branch 'upstream/develop' into webpack-4-dart-sass
* upstream/develop: (126 commits) entity normalizer: hook up in_reply_to_account_acct add BBCode strings fix follow button not updating bug in follow-card refer searched user objects from the global user rep set max-width of textarea in settings page Remove space in the timeline setting copy user_card.vue: Fix .emoji to apply to img Update oc.json Update oc.json Update oc.json Update oc.json replace pencil with wrench icon rebuild fontello with wrench icon added fetch all friends using pagination stop fetching user relationship when user is unauthorized Revert "recover border between basic-user-card using list component" remove extra spacing code readability fix typos clean up ...
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/mastoapi.json125
-rw-r--r--test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js5
-rw-r--r--test/unit/specs/services/notification_utils/notification_utils.spec.js5
3 files changed, 109 insertions, 26 deletions
diff --git a/test/fixtures/mastoapi.json b/test/fixtures/mastoapi.json
index 858d7a0d..887fb83e 100644
--- a/test/fixtures/mastoapi.json
+++ b/test/fixtures/mastoapi.json
@@ -58,7 +58,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639",
"url": "https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -127,7 +130,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/6634d32b-96a8-4852-a3db-ac8730715779",
"url": "https://shigusegubu.club/objects/6634d32b-96a8-4852-a3db-ac8730715779",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -250,7 +256,10 @@
"tags": [],
"uri": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
"url": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
},
"reblogged": false,
"reblogs_count": 0,
@@ -260,7 +269,10 @@
"tags": [],
"uri": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
"url": "https://pleroma.soykaf.com/objects/bf7e43d4-5048-4176-8519-58e3e1014f8b",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -329,7 +341,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/0f963ca1-a263-41ca-a43c-b5d26d0a08e9",
"url": "https://shigusegubu.club/objects/0f963ca1-a263-41ca-a43c-b5d26d0a08e9",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -390,7 +405,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/3f809bd8-656f-4a29-81d4-80eed6916eb0",
"url": "https://shigusegubu.club/objects/3f809bd8-656f-4a29-81d4-80eed6916eb0",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -516,7 +534,10 @@
}],
"uri": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
"url": "https://social.super-niche.club/notice/2353002",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
},
"reblogged": false,
"reblogs_count": 0,
@@ -529,7 +550,10 @@
}],
"uri": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
"url": "tag:social.super-niche.club,2019-01-17:noticeId=2353002:objectType=note",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -657,7 +681,10 @@
"tags": [],
"uri": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
"url": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
},
"reblogged": false,
"reblogs_count": 0,
@@ -667,7 +694,10 @@
"tags": [],
"uri": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
"url": "https://miniwa.moe/objects/448e2944-0ecd-457f-92c3-cb454f2b0fab",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -733,7 +763,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/38b1bc44-15d8-40dd-b1aa-937e0ff4a86d",
"url": "https://shigusegubu.club/objects/38b1bc44-15d8-40dd-b1aa-937e0ff4a86d",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -794,7 +827,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/fbff5da4-a517-42a9-bca9-17cae8cf2542",
"url": "https://shigusegubu.club/objects/fbff5da4-a517-42a9-bca9-17cae8cf2542",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -850,7 +886,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/4007d659-27c6-4577-be10-fd134f5e4e7e",
"url": "https://shigusegubu.club/objects/4007d659-27c6-4577-be10-fd134f5e4e7e",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -906,7 +945,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/59912d51-1cc6-4dc7-828c-f167e6c8b391",
"url": "https://shigusegubu.club/objects/59912d51-1cc6-4dc7-828c-f167e6c8b391",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -962,7 +1004,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/62690bce-3f49-4047-9c8e-8941f2f79e10",
"url": "https://shigusegubu.club/objects/62690bce-3f49-4047-9c8e-8941f2f79e10",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1023,7 +1068,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/818f3dd0-2ff8-4def-a170-e4d4c405f387",
"url": "https://shigusegubu.club/objects/818f3dd0-2ff8-4def-a170-e4d4c405f387",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1084,7 +1132,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/0783a193-c097-488d-8944-47df9372cd6e",
"url": "https://shigusegubu.club/objects/0783a193-c097-488d-8944-47df9372cd6e",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1145,7 +1196,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/145d5252-7b8e-467d-9f36-1db0818f452f",
"url": "https://shigusegubu.club/objects/145d5252-7b8e-467d-9f36-1db0818f452f",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1252,7 +1306,10 @@
"tags": [],
"uri": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
"url": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
},
"reblogged": false,
"reblogs_count": 0,
@@ -1262,7 +1319,10 @@
"tags": [],
"uri": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
"url": "https://pleroma.site/objects/3076c055-0e34-4cf9-86ca-2d148b9b694a",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1323,7 +1383,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/d4eb7c46-02f9-4b1f-83af-926cefa21f33",
"url": "https://shigusegubu.club/objects/d4eb7c46-02f9-4b1f-83af-926cefa21f33",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1446,7 +1509,10 @@
"tags": [],
"uri": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
"url": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
},
"reblogged": false,
"reblogs_count": 0,
@@ -1456,7 +1522,10 @@
"tags": [],
"uri": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
"url": "https://pleroma.soykaf.com/objects/338b6bd2-3c2d-40fe-93a3-28b688782733",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1517,7 +1586,10 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/f472f4ed-8b0b-492f-9d53-d69eda79629d",
"url": "https://shigusegubu.club/objects/f472f4ed-8b0b-492f-9d53-d69eda79629d",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}, {
"account": {
"acct": "hj",
@@ -1578,5 +1650,8 @@
"tags": [],
"uri": "https://shigusegubu.club/objects/d6fb4fd2-1f6a-4446-a1a6-5edd34050096",
"url": "https://shigusegubu.club/objects/d6fb4fd2-1f6a-4446-a1a6-5edd34050096",
- "visibility": "public"
+ "visibility": "public",
+ "pleroma": {
+ "local": true
+ }
}]
diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js
index 2b0b0d6d..bae890f8 100644
--- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js
+++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js
@@ -129,7 +129,10 @@ const makeMockStatusMasto = (overrides = {}) => {
tags: [],
uri: 'https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639',
url: 'https://shigusegubu.club/objects/16033fbb-97c0-4f0e-b834-7abb92fb8639',
- visibility: 'public'
+ visibility: 'public',
+ pleroma: {
+ local: true
+ }
}, overrides)
}
diff --git a/test/unit/specs/services/notification_utils/notification_utils.spec.js b/test/unit/specs/services/notification_utils/notification_utils.spec.js
index e945459e..1baa5fc9 100644
--- a/test/unit/specs/services/notification_utils/notification_utils.spec.js
+++ b/test/unit/specs/services/notification_utils/notification_utils.spec.js
@@ -9,14 +9,17 @@ describe('NotificationUtils', () => {
notifications: {
data: [
{
+ id: 1,
action: { id: '1' },
type: 'like'
},
{
+ id: 2,
action: { id: '2' },
type: 'mention'
},
{
+ id: 3,
action: { id: '3' },
type: 'repeat'
}
@@ -35,10 +38,12 @@ describe('NotificationUtils', () => {
const expected = [
{
action: { id: '3' },
+ id: 3,
type: 'repeat'
},
{
action: { id: '1' },
+ id: 1,
type: 'like'
}
]