Commit 5a676dff2c64fedd96886751208124a810aac82f
1 parent
8fd0120d
Exists in
2.8
and in
6 other branches
Ajustes do CR
Showing
2 changed files
with
5 additions
and
4 deletions
Show diff stats
ieducar/modules/Avaliacao/Views/DiarioApiController.php
tests/Feature/DiarioApi/WithoutScoreDiarioApiTest.php
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | namespace Tests\Feature\DiarioApi; |
4 | 4 | |
5 | 5 | use App\Models\LegacyEvaluationRule; |
6 | +use App_Model_MatriculaSituacao; | |
6 | 7 | use Illuminate\Foundation\Testing\DatabaseTransactions; |
7 | 8 | use Tests\TestCase; |
8 | 9 | |
... | ... | @@ -19,7 +20,7 @@ class WithoutScoreDiarioApiTest extends TestCase |
19 | 20 | /** |
20 | 21 | * @inheritdoc |
21 | 22 | */ |
22 | - protected function setUp() | |
23 | + protected function setUp(): void | |
23 | 24 | { |
24 | 25 | parent::setUp(); |
25 | 26 | $this->evaluationRule = factory(LegacyEvaluationRule::class, 'without-score')->create(); |
... | ... | @@ -37,7 +38,7 @@ class WithoutScoreDiarioApiTest extends TestCase |
37 | 38 | $response = $this->postAbsence($enrollment, $discipline->id, 1, 10); |
38 | 39 | |
39 | 40 | $this->assertEquals('Aprovado', $response->situacao); |
40 | - $this->assertEquals(1, $registration->refresh()->aprovado); | |
41 | + $this->assertEquals(App_Model_MatriculaSituacao::APROVADO, $registration->refresh()->aprovado); | |
41 | 42 | } |
42 | 43 | |
43 | 44 | /** |
... | ... | @@ -56,6 +57,6 @@ class WithoutScoreDiarioApiTest extends TestCase |
56 | 57 | $response = $this->postAbsence($enrollment, $discipline->id, 1, 10); |
57 | 58 | |
58 | 59 | $this->assertEquals('Cursando', $response->situacao); |
59 | - $this->assertEquals(3, $registration->refresh()->aprovado); | |
60 | + $this->assertEquals(App_Model_MatriculaSituacao::EM_ANDAMENTO, $registration->refresh()->aprovado); | |
60 | 61 | } |
61 | 62 | } | ... | ... |