| 240 | |
| 241 | describe('formValuesToPayload', () => { |
| 242 | const makeValues = (overrides = {}) => ({ |
| 243 | username: 'alice', |
| 244 | email: 'alice@example.com', |
| 245 | xc_password: 'mypass', |
| 246 | output_format: 'ts', |
| 247 | output_profile: '3', |
| 248 | hide_adult_content: true, |
| 249 | epg_days: 7, |
| 250 | epg_prev_days: 2, |
| 251 | allowed_ips: ['192.168.1.0/24'], |
| 252 | channel_profiles: ['1', '2'], |
| 253 | ...overrides, |
| 254 | }); |
| 255 | |
| 256 | it('moves xc_password into custom_properties and removes it from payload', () => { |
| 257 | const result = formValuesToPayload(makeValues(), null); |