From 069a7f36e5f50df26ea7818b6184b3f180234e31 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Wed, 9 Oct 2019 13:26:37 +0100
Subject: [PATCH] FEAT #11907 TIME 0:10 tu priorities

---
 src/app/priority/models/PriorityModelAbstract.php      | 2 +-
 test/unitTests/app/priority/PriorityControllerTest.php | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/app/priority/models/PriorityModelAbstract.php b/src/app/priority/models/PriorityModelAbstract.php
index b9415c8d421..6dd18c66121 100755
--- a/src/app/priority/models/PriorityModelAbstract.php
+++ b/src/app/priority/models/PriorityModelAbstract.php
@@ -131,7 +131,7 @@ abstract class PriorityModelAbstract
 
     public static function getByDelays(array $aArgs)
     {
-        ValidatorModel::intType($aArgs, ['delays']);
+        ValidatorModel::intVal($aArgs, ['delays']);
         ValidatorModel::arrayType($aArgs, ['select']);
 
         $aPriority = PriorityModel::get([
diff --git a/test/unitTests/app/priority/PriorityControllerTest.php b/test/unitTests/app/priority/PriorityControllerTest.php
index fbaaf52b1d7..f4bc463ccf9 100755
--- a/test/unitTests/app/priority/PriorityControllerTest.php
+++ b/test/unitTests/app/priority/PriorityControllerTest.php
@@ -24,7 +24,7 @@ class PriorityControllerTest extends TestCase
         $aArgs = [
             'label'             => 'TEST-OVER-URGENT',
             'color'             => '#ffffff',
-            'delays'            => '2',
+            'delays'            => '72',
         ];
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
@@ -44,7 +44,7 @@ class PriorityControllerTest extends TestCase
         $this->assertSame(self::$id, $responseBody->priority->id);
         $this->assertSame('TEST-OVER-URGENT', $responseBody->priority->label);
         $this->assertSame('#ffffff', $responseBody->priority->color);
-        $this->assertSame(2, $responseBody->priority->delays);
+        $this->assertSame(72, $responseBody->priority->delays);
     }
 
     public function testGet()
@@ -72,7 +72,7 @@ class PriorityControllerTest extends TestCase
         $aArgs = [
             'label'             => 'TEST-OVER-URGENT-UPDATED',
             'color'             => '#f2f2f2',
-            'delays'            => '4',
+            'delays'            => '64',
         ];
         $fullRequest = \httpRequestCustom::addContentInBody($aArgs, $request);
 
@@ -90,7 +90,7 @@ class PriorityControllerTest extends TestCase
         $this->assertSame(self::$id, $responseBody->priority->id);
         $this->assertSame('TEST-OVER-URGENT-UPDATED', $responseBody->priority->label);
         $this->assertSame('#f2f2f2', $responseBody->priority->color);
-        $this->assertSame(4, $responseBody->priority->delays);
+        $this->assertSame(64, $responseBody->priority->delays);
     }
 
     public function testDelete()
-- 
GitLab