Skip to content

Instantly share code, notes, and snippets.

@azangru
Created November 12, 2015 17:25
Show Gist options
  • Save azangru/ba35a834946feb3f4975 to your computer and use it in GitHub Desktop.
Save azangru/ba35a834946feb3f4975 to your computer and use it in GitHub Desktop.
describe('Checkin Repository', () => {
let checkinRepository, httpBackend;
beforeEach(() => {
module('app');
});
beforeEach(inject(($httpBackend, checkinDeviceRepository) => {
httpBackend = $httpBackend;
checkinRepository = checkinDeviceRepository;
}));
afterEach(() => {
httpBackend.verifyNoOutstandingExpectation();
httpBackend.verifyNoOutstandingRequest();
});
it('should send requests to checkin/devices', () => {
httpBackend.expectPOST('/qapi/checkin/devices/list');
checkinRepository.findAll();
httpBackend.flush();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment