Skip to content

Commit

Permalink
Petites corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Donov4n committed Jan 9, 2022
1 parent 873af22 commit 3a49bcc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client/src/locale/fr/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ export default {
'help': "Ici, vous pouvez personnaliser le calendrier et les événements affichés sur celui-ci.",
'saved': "Les paramètres du calendrier ont bien été sauvegardés.",
'events-display-section-title': "Données affichées dans les événements du calendrier",
'showLocation': "Afficher le lieu de l'événement ?",
'showBorrower': "Afficher le bénéficiaire / emprunteur ?",
'showLocation': "Afficher le lieu de l'événement\u00a0?",
'showBorrower': "Afficher le bénéficiaire / emprunteur\u00a0?",
},
},

Expand Down
37 changes: 36 additions & 1 deletion server/tests/endpoints/SettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testUpdateBadValue(): void
$this->assertValidationErrorMessage();
$this->assertErrorDetails([
'calendar.event.showBorrower' => [
'value must be a boolean',
'value must be a boolean value',
],
'eventSummary.materialDisplayMode' => [
'At least one of these rules must pass for value',
Expand All @@ -66,6 +66,41 @@ public function testUpdateBadValue(): void

public function testUpdate(): void
{
$this->client->put('/api/settings', [
'eventSummary' => [
'customText' => [
'title' => 'foo',
'content' => 'bar',
],
'materialDisplayMode' => 'sub-categories',
'showLegalNumbers' => true,
],
'calendar' => [
'event' => [
'showBorrower' => false,
'showLocation' => false,
],
],
]);
$this->assertStatusCode(SUCCESS_OK);
$this->assertResponseData([
'eventSummary' => [
'customText' => [
'title' => 'foo',
'content' => 'bar',
],
'materialDisplayMode' => 'sub-categories',
'showLegalNumbers' => true,
],
'calendar' => [
'event' => [
'showBorrower' => false,
'showLocation' => false,
],
],
]);

// - Syntaxe alternative
$this->client->put('/api/settings', [
'calendar.event.showBorrower' => true,
'eventSummary.materialDisplayMode' => 'flat',
Expand Down

0 comments on commit 3a49bcc

Please sign in to comment.