@@ -7,7 +7,7 @@ import { catchErr, expect, sinon } from '../../../../../test-helper.js';
7
7
import { domainBuilder } from '../../../../../tooling/domain-builder/domain-builder.js' ;
8
8
9
9
describe ( 'Unit | API | TargetProfile' , function ( ) {
10
- describe ( '#getById ' , function ( ) {
10
+ describe ( '#getByIdForAdmin ' , function ( ) {
11
11
it ( 'should return target profile' , async function ( ) {
12
12
const targetProfileId = 1 ;
13
13
const targetProfileForAdmin = domainBuilder . buildTargetProfileForAdmin ( { id : targetProfileId } ) ;
@@ -16,7 +16,7 @@ describe('Unit | API | TargetProfile', function () {
16
16
const getTargetProfileForAdminStub = sinon . stub ( usecases , 'getTargetProfileForAdmin' ) ;
17
17
getTargetProfileForAdminStub . withArgs ( { targetProfileId } ) . resolves ( targetProfileForAdmin ) ;
18
18
19
- const targetProfile = await targetProfileApi . getById ( targetProfileId ) ;
19
+ const targetProfile = await targetProfileApi . getByIdForAdmin ( targetProfileId ) ;
20
20
21
21
expect ( targetProfile ) . to . deep . equal ( expectedTargetProfile ) ;
22
22
} ) ;
@@ -27,7 +27,7 @@ describe('Unit | API | TargetProfile', function () {
27
27
const getTargetProfileForAdminStub = sinon . stub ( usecases , 'getTargetProfileForAdmin' ) ;
28
28
getTargetProfileForAdminStub . withArgs ( { targetProfileId } ) . rejects ( ) ;
29
29
30
- const error = await catchErr ( targetProfileApi . getById ) ( targetProfileId ) ;
30
+ const error = await catchErr ( targetProfileApi . getByIdForAdmin ) ( targetProfileId ) ;
31
31
32
32
expect ( error ) . to . be . ok ;
33
33
} ) ;
0 commit comments