|
61 | 61 | end |
62 | 62 |
|
63 | 63 | it 'includes properly set meta flags for user not at pretransitioned oh facility' do |
64 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357' |
65 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '456, 789' |
66 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '' |
| 64 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 65 | + pretransitioned_oh_facilities: '612, 357', |
| 66 | + facilities_ready_for_info_alert: '456, 789', |
| 67 | + oh_migrations_list: '' |
| 68 | + ) |
67 | 69 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
68 | 70 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
69 | 71 | assert_schema_conform(200) |
|
74 | 76 | end |
75 | 77 |
|
76 | 78 | it 'includes properly set meta flags for user at pretransitioned oh facility but not ready for info alert' do |
77 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357, 555' |
78 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '456, 789' |
79 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '' |
| 79 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 80 | + pretransitioned_oh_facilities: '612, 357, 555', |
| 81 | + facilities_ready_for_info_alert: '456, 789', |
| 82 | + oh_migrations_list: '' |
| 83 | + ) |
80 | 84 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
81 | 85 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
82 | 86 | assert_schema_conform(200) |
|
90 | 94 | end |
91 | 95 |
|
92 | 96 | it 'includes properly set meta flags for user at pretransitioned oh facility and ready for info alert' do |
93 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357, 555' |
94 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '555' |
95 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '' |
| 97 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 98 | + pretransitioned_oh_facilities: '612, 357, 555', |
| 99 | + facilities_ready_for_info_alert: '555', |
| 100 | + oh_migrations_list: '' |
| 101 | + ) |
96 | 102 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
97 | 103 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
98 | 104 | assert_schema_conform(200) |
|
106 | 112 | end |
107 | 113 |
|
108 | 114 | it 'includes properly set meta flags for actively migrating facility' do |
109 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357' |
110 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '612' |
111 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '2026-10-01:[555,Facility A],[612,Facility B]' |
| 115 | + migrations_list = '2026-10-01:[555,Facility A],[612,Facility B]' |
| 116 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 117 | + pretransitioned_oh_facilities: '612, 357', |
| 118 | + facilities_ready_for_info_alert: '612', |
| 119 | + oh_migrations_list: migrations_list |
| 120 | + ) |
112 | 121 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
113 | 122 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
114 | 123 | assert_schema_conform(200) |
|
372 | 381 | end |
373 | 382 |
|
374 | 383 | it 'includes properly sets migratingFacilitiesList when user does not have a migrating facility' do |
375 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357' |
376 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '612' |
377 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '2026-10-01:[999,Facility A],[888,Facility B]' |
| 384 | + migrations_list = '2026-10-01:[999,Facility A],[888,Facility B]' |
| 385 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 386 | + pretransitioned_oh_facilities: '612, 357', |
| 387 | + facilities_ready_for_info_alert: '612', |
| 388 | + oh_migrations_list: migrations_list |
| 389 | + ) |
378 | 390 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
379 | 391 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
380 | 392 | assert_schema_conform(200) |
|
384 | 396 | end |
385 | 397 |
|
386 | 398 | it 'includes properly sets migratingFacilitiesList when user does have a migrating facility' do |
387 | | - Settings.mhv.oh_facility_checks.pretransitioned_oh_facilities = '612, 357' |
388 | | - Settings.mhv.oh_facility_checks.facilities_ready_for_info_alert = '612' |
389 | | - Settings.mhv.oh_facility_checks.oh_migrations_list = '2026-10-01:[555,Facility A],[555,Facility B]' |
| 399 | + migrations_list = '2026-10-01:[555,Facility A],[555,Facility B]' |
| 400 | + allow(Settings.mhv.oh_facility_checks).to receive_messages( |
| 401 | + pretransitioned_oh_facilities: '612, 357', |
| 402 | + facilities_ready_for_info_alert: '612', |
| 403 | + oh_migrations_list: migrations_list |
| 404 | + ) |
390 | 405 | get '/mobile/v0/user/authorized-services', headers: sis_headers, |
391 | 406 | params: { 'appointmentIEN' => '123', 'locationId' => '123' } |
392 | 407 | assert_schema_conform(200) |
|
0 commit comments