presidential-innovation-fellows/code-gov-web

View on GitHub
src/app/services/help-wanted/help-wanted.service.spec.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { async, getTestBed, TestBed } from '@angular/core/testing';
import { HttpModule } from '@angular/http';
import { HelpWantedService } from './help-wanted.service';
import { Agency, ClientService } from '../client';

describe('HelpWantedService', () => {

  let service: HelpWantedService;

  beforeEach(async(() => {

    TestBed.configureTestingModule({
      providers: [
        ClientService,
        HelpWantedService
      ],
      imports: [HttpModule]
    });

    const testbed = getTestBed();
    service = testbed.get(HelpWantedService);

  }));

  describe('tasks', () => {
    it('get tasks', (done) => {
      service.getTasks().subscribe((tasks) => {
        expect(tasks.length).toBeGreaterThanOrEqual(5);
        done();
      });
    });
  });

});