import { ComponentFixture, TestBed } from '@angular/core/testing';
import { getMockPipe } from '@shared/pipes/pipe.mock';
import { FlightStatusLogic } from '../flight-status-button/flight-status.logic';

import { DetailsHeaderBadgeComponent } from './details-header-badge.component';

describe('DetailsHeaderBadgeComponent', () => {
    let component: DetailsHeaderBadgeComponent;
    let fixture: ComponentFixture<DetailsHeaderBadgeComponent>;
    let logic: FlightStatusLogic;

    beforeEach(async () => {
        await TestBed.configureTestingModule({
            declarations: [
                DetailsHeaderBadgeComponent,
                getMockPipe('flightNumber'),
                getMockPipe('codesharing'),
            ],
            providers: [
                {
                    provide: FlightStatusLogic,
                    useFactory: () => logic,
                },
            ],
        }).compileComponents();
    });

    beforeEach(() => {
        fixture = TestBed.createComponent(DetailsHeaderBadgeComponent);
        component = fixture.componentInstance;
        fixture.detectChanges();
    });

    it('should create', () => {
        expect(component).toBeTruthy();
    });
});
