aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/admin-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-09 15:37:43 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit9293139fde7091e9badcafa9b570b83cea9a10ad (patch)
tree9728412f02af4aa59d2c016db47624251e8f6be6 /server/tests/api/notifications/admin-notifications.ts
parent078f17e6d90376050f43ce639e88e11869b49ee7 (diff)
downloadPeerTube-9293139fde7091e9badcafa9b570b83cea9a10ad.tar.gz
PeerTube-9293139fde7091e9badcafa9b570b83cea9a10ad.tar.zst
PeerTube-9293139fde7091e9badcafa9b570b83cea9a10ad.zip
Introduce sql command
Diffstat (limited to 'server/tests/api/notifications/admin-notifications.ts')
-rw-r--r--server/tests/api/notifications/admin-notifications.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index da9767b74..03fbe0b70 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -11,8 +11,6 @@ import {
11 MockSmtpServer, 11 MockSmtpServer,
12 prepareNotificationsTest, 12 prepareNotificationsTest,
13 ServerInfo, 13 ServerInfo,
14 setPluginLatestVersion,
15 setPluginVersion,
16 wait 14 wait
17} from '@shared/extra-utils' 15} from '@shared/extra-utils'
18import { PluginType, UserNotification, UserNotificationType } from '@shared/models' 16import { PluginType, UserNotification, UserNotificationType } from '@shared/models'
@@ -120,8 +118,8 @@ describe('Test admin notifications', function () {
120 it('Should send a notification to admins on new plugin version', async function () { 118 it('Should send a notification to admins on new plugin version', async function () {
121 this.timeout(30000) 119 this.timeout(30000)
122 120
123 await setPluginVersion(server.internalServerNumber, 'hello-world', '0.0.1') 121 await server.sqlCommand.setPluginVersion('hello-world', '0.0.1')
124 await setPluginLatestVersion(server.internalServerNumber, 'hello-world', '0.0.1') 122 await server.sqlCommand.setPluginLatestVersion('hello-world', '0.0.1')
125 await wait(6000) 123 await wait(6000)
126 124
127 await checkNewPluginVersion(baseParams, PluginType.PLUGIN, 'hello-world', 'presence') 125 await checkNewPluginVersion(baseParams, PluginType.PLUGIN, 'hello-world', 'presence')
@@ -142,8 +140,8 @@ describe('Test admin notifications', function () {
142 it('Should send a new notification after a new plugin release', async function () { 140 it('Should send a new notification after a new plugin release', async function () {
143 this.timeout(30000) 141 this.timeout(30000)
144 142
145 await setPluginVersion(server.internalServerNumber, 'hello-world', '0.0.1') 143 await server.sqlCommand.setPluginVersion('hello-world', '0.0.1')
146 await setPluginLatestVersion(server.internalServerNumber, 'hello-world', '0.0.1') 144 await server.sqlCommand.setPluginLatestVersion('hello-world', '0.0.1')
147 await wait(6000) 145 await wait(6000)
148 146
149 expect(adminNotifications.filter(n => n.type === UserNotificationType.NEW_PEERTUBE_VERSION)).to.have.lengthOf(2) 147 expect(adminNotifications.filter(n => n.type === UserNotificationType.NEW_PEERTUBE_VERSION)).to.have.lengthOf(2)