Updagre tests
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
meta {
|
||||
name: Delete profile photo
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{url}}/api/profile-photo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body.message: eq "Photo supprimée"
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
# /profile-photo -- DELETE
|
||||
|
||||
Supprime la photo de profil de l'utilisateur connecté.
|
||||
|
||||
Authentification requise.
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
meta {
|
||||
name: Get profile photo
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/profile-photo
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body.profile_photo_path: isDefined
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
# /profile-photo -- GET
|
||||
|
||||
Retourne le chemin de la photo de profil de l'utilisateur connecté.
|
||||
|
||||
Authentification requise.
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
meta {
|
||||
name: Update profile photo
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/profile-photo
|
||||
body: multipartForm
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:multipart-form {
|
||||
photo: @file(photo.jpg)
|
||||
}
|
||||
|
||||
assert {
|
||||
res.status: eq 200
|
||||
res.body.profile_photo_path: isDefined
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
# /profile-photo -- POST
|
||||
|
||||
Met à jour la photo de profil de l'utilisateur connecté.
|
||||
L'ancienne photo est supprimée si elle existe.
|
||||
|
||||
Authentification requise.
|
||||
|
||||
Entrée: photo (fichier image jpeg/png/jpg/gif, max 2MB)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: Profile photo
|
||||
seq: 10
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
Reference in New Issue
Block a user