@@ -5,22 +5,20 @@ import InformationView from 'pix-admin/components/certification-centers/informat
5
5
import { module , test } from ' qunit' ;
6
6
7
7
import setupIntlRenderingTest from ' ../../../helpers/setup-intl-rendering' ;
8
- function _createEmberDataHabilitations (store ) {
9
- return ArrayProxy .create ({
10
- content: [
11
- store .createRecord (' complementary-certification' , { id: 0 , key: ' DROIT' , label: ' Pix+Droit' }),
12
- store .createRecord (' complementary-certification' , { id: 1 , key: ' CLEA' , label: ' Cléa' }),
13
- ],
14
- });
15
- }
16
8
17
9
module (' Integration | Component | certification-centers/information-view' , function (hooks ) {
18
10
setupIntlRenderingTest (hooks);
19
11
20
12
test (' it should display label and values in read mode' , async function (assert ) {
21
13
// given
22
14
const store = this .owner .lookup (' service:store' );
23
- const availableHabilitations = _createEmberDataHabilitations (store);
15
+ const pixDroitHabilitation = store .createRecord (' complementary-certification' , {
16
+ id: 0 ,
17
+ key: ' DROIT' ,
18
+ label: ' Pix+Droit' ,
19
+ });
20
+ const cleaHabilitation = store .createRecord (' complementary-certification' , { id: 1 , key: ' CLEA' , label: ' Cléa' });
21
+ const availableHabilitations = ArrayProxy .create ({ content: [pixDroitHabilitation, cleaHabilitation] });
24
22
25
23
const certificationCenter = store .createRecord (' certification-center' , {
26
24
name: ' Centre SCO' ,
@@ -29,7 +27,7 @@ module('Integration | Component | certification-centers/information-view', funct
29
27
dataProtectionOfficerFirstName: ' Lucky' ,
30
28
dataProtectionOfficerLastName: ' Number' ,
31
29
dataProtectionOfficerEmail: ' lucky@example.net' ,
32
- habilitations: [availableHabilitations . firstObject ],
30
+ habilitations: [pixDroitHabilitation ],
33
31
});
34
32
35
33
// when
0 commit comments