File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ def access?
1414
1515 def log_access_denied
1616 Rails . logger . info ( 'POA ACCESS DENIED' ,
17- loa : user . loa &.dig ( :current ) ,
17+ loa_current : user . loa &.dig ( :current ) ,
1818 loa3 : user . loa3? ,
19- icn : user . icn . present? ,
20- participant_id : user . participant_id . present? )
19+ icn_present : user . icn . present? ,
20+ participant_id_present : user . participant_id . present? )
2121 end
2222end
Original file line number Diff line number Diff line change 1010 let ( :user ) { build ( :user , :loa3 ) }
1111
1212 it 'grants access and does not log' do
13- expect ( Rails . logger ) . not_to receive ( :info )
13+ expect ( Rails . logger ) . not_to receive ( :info ) . with ( 'POA ACCESS DENIED' , anything )
1414 expect ( subject ) . to permit ( user , :power_of_attorney )
1515 end
1616 end
2222 expect ( Rails . logger ) . to receive ( :info ) . with (
2323 'POA ACCESS DENIED' ,
2424 hash_including (
25- loa : 3 ,
25+ loa_current : 3 ,
2626 loa3 : true ,
27- icn : false ,
28- participant_id : true
27+ icn_present : false ,
28+ participant_id_present : true
2929 )
3030 )
3131 expect ( subject ) . not_to permit ( user , :power_of_attorney )
3939 expect ( Rails . logger ) . to receive ( :info ) . with (
4040 'POA ACCESS DENIED' ,
4141 hash_including (
42- loa : 3 ,
42+ loa_current : 3 ,
4343 loa3 : true ,
44- icn : true ,
45- participant_id : false
44+ icn_present : true ,
45+ participant_id_present : false
4646 )
4747 )
4848 expect ( subject ) . not_to permit ( user , :power_of_attorney )
5656 expect ( Rails . logger ) . to receive ( :info ) . with (
5757 'POA ACCESS DENIED' ,
5858 hash_including (
59- loa : 1 ,
59+ loa_current : 1 ,
6060 loa3 : false ,
61- icn : true ,
62- participant_id : false
61+ icn_present : true ,
62+ participant_id_present : false
6363 )
6464 )
6565 expect ( subject ) . not_to permit ( user , :power_of_attorney )
You can’t perform that action at this time.
0 commit comments