|
| 1 | +import { axiosInstance } from 'api'; |
| 2 | + |
| 3 | +import { fetchSettings, SettingsType } from './settings'; |
| 4 | + |
| 5 | +test('api get cost category keys', () => { |
| 6 | + fetchSettings(SettingsType.costCategories, ''); |
| 7 | + expect(axiosInstance.get).toBeCalledWith('settings/aws_category_keys/'); |
| 8 | +}); |
| 9 | + |
| 10 | +test('api get platform projects', () => { |
| 11 | + fetchSettings(SettingsType.platformProjects, ''); |
| 12 | + expect(axiosInstance.get).toBeCalledWith('settings/cost-groups/'); |
| 13 | +}); |
| 14 | + |
| 15 | +test('api get child tag mappings', () => { |
| 16 | + fetchSettings(SettingsType.tagsMappingsChild, ''); |
| 17 | + expect(axiosInstance.get).toBeCalledWith('settings/tags/mappings/child'); |
| 18 | +}); |
| 19 | + |
| 20 | +test('api get parent tag mappings', () => { |
| 21 | + fetchSettings(SettingsType.tagsMappingsParent, ''); |
| 22 | + expect(axiosInstance.get).toBeCalledWith('settings/tags/mappings/parent'); |
| 23 | +}); |
| 24 | + |
| 25 | +test('api get tag mappings', () => { |
| 26 | + fetchSettings(SettingsType.tagsMappings, ''); |
| 27 | + expect(axiosInstance.get).toBeCalledWith('settings/tags/mappings'); |
| 28 | +}); |
| 29 | + |
| 30 | +test('api get tags', () => { |
| 31 | + fetchSettings(SettingsType.tags, ''); |
| 32 | + expect(axiosInstance.get).toBeCalledWith('settings/tags'); |
| 33 | +}); |
0 commit comments