File tree Expand file tree Collapse file tree
lib/server/services/dataPasses
test/lib/server/services/dataPasses Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class DataPassService {
5353 } else if ( name ) {
5454 queryBuilder . where ( 'name' ) . is ( name ) ;
5555 } else {
56- throw new BadParameterError ( 'Can not find without LHC Period id or name' ) ;
56+ throw new BadParameterError ( 'Can not find without Data Pass id or name' ) ;
5757 }
5858
5959 queryBuilder . includeAttribute ( {
@@ -72,12 +72,12 @@ class DataPassService {
7272 * @return {Promise<DataPass[]> } the dats pass found
7373 */
7474 async getOneOrFail ( { id, name } ) {
75- const lhcPeriodStatistics = await this . getByIdentifier ( { id, name } ) ;
76- if ( ! lhcPeriodStatistics ) {
75+ const dataPass = await this . getByIdentifier ( { id, name } ) ;
76+ if ( ! dataPass ) {
7777 const criteriaExpression = id !== undefined && id !== null ? `id (${ id } )` : `name (${ name } )` ;
7878 throw new NotFoundError ( `Data Pass with this ${ criteriaExpression } could not be found` ) ;
7979 }
80- return lhcPeriodStatistics ;
80+ return dataPass ;
8181 }
8282
8383 /**
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ module.exports = () => {
5151 before ( resetDatabaseContent ) ;
5252
5353 it ( 'should succesfully get by id' , async ( ) => {
54- const lhcPeriod = await dataPassService . getByIdentifier ( { id : 1 } ) ;
55- expect ( lhcPeriod ) . to . be . eql ( LHC22b_apass1 ) ;
54+ const dataPass = await dataPassService . getByIdentifier ( { id : 1 } ) ;
55+ expect ( dataPass ) . to . be . eql ( LHC22b_apass1 ) ;
5656 } ) ;
5757
5858 it ( 'should succesfully get by name' , async ( ) => {
59- const lhcPeriod = await dataPassService . getByIdentifier ( { name : 'LHC22a_apass1' } ) ;
60- expect ( lhcPeriod ) . to . be . eql ( LHC22a_apass1 ) ;
59+ const dataPass = await dataPassService . getByIdentifier ( { name : 'LHC22a_apass1' } ) ;
60+ expect ( dataPass ) . to . be . eql ( LHC22a_apass1 ) ;
6161 } ) ;
6262
6363 it ( 'should succesfully get all data' , async ( ) => {
You can’t perform that action at this time.
0 commit comments