{"size": 1239, "ext": "js", "max_stars_repo_path": "spec/javascripts/inventories/InventorySpec.js", "max_stars_repo_name": "seanperkins/pdredesign-sevenzo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "spec/javascripts/inventories/InventorySpec.js", "max_issues_repo_name": "seanperkins/pdredesign-sevenzo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "spec/javascripts/inventories/InventorySpec.js", "max_forks_repo_name": "seanperkins/pdredesign-sevenzo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.9347826087, "max_line_length": 81, "alphanum_fraction": 0.5552865214}
(function() {
  'use strict';
  describe('Resource: Inventory', function() {
    var subject,
        $httpBackend,
        $resource;

    beforeEach(function() {
      module('PDRClient');
      inject(function(_$httpBackend_, _$resource_, $injector) {
        subject = $injector.get('Inventory');
        $resource = _$resource_;
        $httpBackend = _$httpBackend_;
      });
    });

    describe('#get', function() {
      it('uses the right URL', function() {
        $httpBackend.expect('GET', '/v1/inventories').respond({inventories: []});
        subject.get();
        expect($httpBackend.flush).not.toThrow();
      })
    });

    describe('#create', function() {
      it('uses the right URL', function() {
        $httpBackend.expect('POST', '/v1/inventories').respond({200: {}});
        subject.create();
        expect($httpBackend.flush).not.toThrow();
      });
    });

    describe('#save', function() {
      it('uses the right URL', function() {
        $httpBackend.expect('PUT', '/v1/inventories').respond({204: {}});
        subject.save();
        expect($httpBackend.flush).not.toThrow();
      });
    });

    afterEach(function() {
      $httpBackend.verifyNoOutstandingExpectation();
    })
  });
})();
