Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
84992f56
Verified
Commit
84992f56
authored
Aug 03, 2022
by
Chocobozzz
Browse files
Fix tests
parent
5bdc3419
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/tests/api/videos/video-channels.ts
View file @
84992f56
...
...
@@ -430,7 +430,7 @@ describe('Test video channels', function () {
expect
(
body
.
data
[
1
].
displayName
).
to
.
equal
(
'
video channel updated
'
)
})
it
(
'
Should create the main channel with a
n uuid
if there is a conflict
'
,
async
function
()
{
it
(
'
Should create the main channel with a
suffix
if there is a conflict
'
,
async
function
()
{
{
const
videoChannel
=
{
name
:
'
toto_channel
'
,
displayName
:
'
My toto channel
'
}
const
created
=
await
servers
[
0
].
channels
.
create
({
attributes
:
videoChannel
})
...
...
@@ -442,8 +442,7 @@ describe('Test video channels', function () {
const
accessToken
=
await
servers
[
0
].
login
.
getAccessToken
({
username
:
'
toto
'
,
password
:
'
password
'
})
const
{
videoChannels
}
=
await
servers
[
0
].
users
.
getMyInfo
({
token
:
accessToken
})
const
videoChannel
=
videoChannels
[
0
]
expect
(
videoChannel
.
name
).
to
.
match
(
/
[
0-9a-f
]{8}
-
[
0-9a-f
]{4}
-
[
0-9a-f
]{4}
-
[
0-9a-f
]{4}
-
[
0-9a-f
]{12}
/
)
expect
(
videoChannels
[
0
].
name
).
to
.
equal
(
'
toto_channel-1
'
)
}
})
...
...
server/tests/fixtures/peertube-plugin-test-id-pass-auth-three/main.js
View file @
84992f56
...
...
@@ -32,7 +32,7 @@ async function register ({
login
(
body
)
{
if
(
body
.
id
===
'
ward
'
)
{
return
Promise
.
resolve
({
username
:
'
ward-42
'
,
username
:
'
-
ward-42
'
,
email
:
'
ward@example.com
'
})
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment