import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterHandlerService } from '@shared/services/router-handler.service';
import { getMockPipe } from '@shared/pipes/pipe.mock';
import { FlightDetailsButtonComponent } from './flight-details-button.component';

describe('FlightDetailsButtonComponent', () => {
    let component: FlightDetailsButtonComponent;
    let fixture: ComponentFixture<FlightDetailsButtonComponent>;
    let router: RouterHandlerService;

    beforeEach(async () => {
        router = {} as any;
        await TestBed.configureTestingModule({
            declarations: [
                FlightDetailsButtonComponent,
                getMockPipe('translate'),
            ],
            providers: [
                { provide: RouterHandlerService, useFactory: () => router },
            ],
        }).compileComponents();
    });

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

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