- Add EdaCommunicationMethod enum (EMAIL, MESSENGER) - Add EdaSettings entity with DB-persisted communication method - Add AdminEdaSettingsController (GET/PUT /api/admin/eda-settings) - Add EdaCommunicationRouter that resolves the correct EdaConsentService - Add MessengerEdaConsentService as placeholder (throws UnsupportedOperationException) - Add AdminEdaSettingsComponent in frontend with radio button selection - Route /dashboard/admin-eda-settings (ADMIN only) - Update EdaCommunicationEventListener to use router - Remove @Profile from EmailEdaConsentService/SimulatedEdaConsentService - Use @Lazy for EdaMailSender dependency to support non-prod contexts - Fix pre-existing deleteUserTariff API call mismatch
28 lines
965 B
TypeScript
28 lines
965 B
TypeScript
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
|
import {provideHttpClient} from '@angular/common/http';
|
|
import {provideHttpClientTesting} from '@angular/common/http/testing';
|
|
import {AdminEdaSettingsComponent} from './admin-eda-settings';
|
|
import {describe, expect, it} from 'vitest';
|
|
|
|
describe('AdminEdaSettingsComponent', () => {
|
|
let component: AdminEdaSettingsComponent;
|
|
let fixture: ComponentFixture<AdminEdaSettingsComponent>;
|
|
|
|
beforeEach(async () => {
|
|
await TestBed.configureTestingModule({
|
|
imports: [AdminEdaSettingsComponent],
|
|
providers: [provideHttpClient(), provideHttpClientTesting()]
|
|
}).compileComponents();
|
|
|
|
fixture = TestBed.createComponent(AdminEdaSettingsComponent);
|
|
component = fixture.componentInstance;
|
|
});
|
|
|
|
it('should create', () => {
|
|
expect(component).toBeTruthy();
|
|
});
|
|
|
|
it('should have default method EMAIL', () => {
|
|
expect(component.selectedMethod()).toBe('EMAIL');
|
|
});
|
|
});
|