File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed
src/routes/billingAccounts Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -114,16 +114,6 @@ describe('Project Billing Accounts list', () => {
114114 . expect ( 403 , done ) ;
115115 } ) ;
116116
117- it ( 'should return 403 for admin' , ( done ) => {
118- request ( server )
119- . get ( `/v5/projects/${ project1 . id } /billingAccount` )
120- . set ( {
121- Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
122- } )
123- . send ( )
124- . expect ( 403 , done ) ;
125- } ) ;
126-
127117 it ( 'should return 404 if the project is not found' , ( done ) => {
128118 request ( server )
129119 . get ( '/v5/projects/11223344/billingAccount' )
@@ -163,5 +153,26 @@ describe('Project Billing Accounts list', () => {
163153 }
164154 } ) ;
165155 } ) ;
156+
157+ it ( 'should return billing account details using user token but without markup field' ,
158+ ( done ) => {
159+ request ( server )
160+ . get ( `/v5/projects/${ project1 . id } /billingAccount` )
161+ . set ( {
162+ Authorization : `Bearer ${ testUtil . jwts . admin } ` ,
163+ } )
164+ . send ( )
165+ . expect ( 200 )
166+ . end ( ( err , res ) => {
167+ if ( err ) {
168+ done ( err ) ;
169+ } else {
170+ const resJson = res . body ;
171+ resJson . tcBillingAccountId . should . be . eql ( billingAccountData . tcBillingAccountId ) ;
172+ resJson . markup . should . not . exist ;
173+ done ( ) ;
174+ }
175+ } ) ;
176+ } ) ;
166177 } ) ;
167178} ) ;
You can’t perform that action at this time.
0 commit comments