import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { UserListPageComponent } from './user-list.page.component';

describe('UserListPageComponent', () => {
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [RouterTestingModule],
      declarations: [UserListPageComponent]
    }).compileComponents();
  }));

  it('should create the app', () => {
    const fixture = TestBed.createComponent(UserListPageComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app).toBeTruthy();
  });

  it(`should have as title 'backend'`, () => {
    const fixture = TestBed.createComponent(UserListPageComponent);
    const app = fixture.debugElement.componentInstance;
    expect(app.title).toEqual('backend');
  });

  it('should render title', () => {
    const fixture = TestBed.createComponent(UserListPageComponent);
    fixture.detectChanges();
    const compiled = fixture.debugElement.nativeElement;
    expect(compiled.querySelector('.content span').textContent).toContain(
      'backend app is running!'
    );
  });
});
