diff options
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r-- | server/tests/api/notifications/admin-notifications.ts | 10 |
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' |
18 | import { PluginType, UserNotification, UserNotificationType } from '@shared/models' | 16 | import { 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) |