message: Trigger change detection before testing expectations
diff: @@ -32,7 +32,6 @@ describe('LastLoginIpComponent', () => {
  beforeEach(() => {
  fixture = TestBed.createComponent(LastLoginIpComponent)
  component = fixture.componentInstance
  - component.lastLoginIp = '?'
  fixture.detectChanges()
  })
  @@ -44,18 +43,21 @@ describe('LastLoginIpComponent', () => {
  console.log = jasmine.createSpy('log')
  localStorage.setItem('token', 'definitelyInvalidJWT')
  component.ngOnInit()
  + fixture.detectChanges()
  expect(console.log).toHaveBeenCalled()
  })
  it('should set Last-Login IP from JWT as trusted HTML', () => {
  localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Imxhc3RMb2dpbklwIjoiMS4yLjMuNCJ9fQ.RAkmdqwNypuOxv3SDjPO4xMKvd1CddKvDFYDBfUt3bg')
  component.ngOnInit()
  + fixture.detectChanges()
  expect(sanitizer.bypassSecurityTrustHtml).toHaveBeenCalledWith('<small>1.2.3.4</small>')
  })
  it('should not set Last-Login IP if none is present in JWT', () => {
  localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fX0.bVBhvll6IaeR3aUdoOeyR8YZe2S2DfhGAxTGfd9enLw')
  component.ngOnInit()
  + fixture.detectChanges()
  expect(component.lastLoginIp).toBe('?')
  })
  })
  