import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { DocumentationComponent } from './documentation.component';
import {RbCustomInputsModule} from '../rb-custom-inputs/rb-custom-inputs.module';
import {ApiService} from '../services/api.service';

// TODO

let apiServiceSpy: jasmine.SpyObj<ApiService>;

describe('DocumentationComponent', () => {
  let component: DocumentationComponent;
  let fixture: ComponentFixture<DocumentationComponent>;

  beforeEach(async(() => {
    const apiSpy = jasmine.createSpyObj('ApiService', ['post', 'put']);

    TestBed.configureTestingModule({
      declarations: [ DocumentationComponent ],
      imports: [
        RbCustomInputsModule
      ],
      providers: [
        {provide: ApiService, useValue: apiSpy}
      ]
    })
    .compileComponents();

    apiServiceSpy = TestBed.inject(ApiService) as jasmine.SpyObj<ApiService>;
  }));

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

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