describe( 'resource-solver', function() {

  beforeEach(module('resourceSolver'));

  it( 'fetch basic resource should return data', function() {

    module('ngResource', function($resourceProvider) {
      $resourceProvider.setData({
        test: 'value'
      });
    });

    inject(function(rs) {

      //Define resource
      var resource = rs({
        url: 'test'
      });
      expect(rs).not.toBeUndefined();

      //Fetch resource
      var promise = resource.fetch();
      expect(promise).not.toBeUndefined();
      expect(promise.then).not.toBeUndefined();

      //Wait data
      var data;
      promise.then(function(_data) {
        data = _data;
      });
      expect(data).not.toBeUndefined();
      expect(data.test).toBe('value');
    });

  });

});

@@ -767,12 +767,636 @@
 %0A  %7D);%0A%0A
+  it( 'submit rsUrl without data should log error', function() %7B%0A%0A    inject(function($rootScope, $compile, $http) %7B%0A%0A      var elem = angular.element('%3Cform rs-url=%22test%22%3E%3C/form%3E');%0A      $compile(elem)($rootScope);%0A%0A      var controller = elem.controller('rsUrl');%0A      expect(controller).not.toBeUndefined();%0A%0A      var message;%0A      var spyCall = spyOn(console, 'error').and.callFake(function(m) %7B%0A        message = m;%0A        spyCall.and.callThrough();%0A      %7D);%0A      var promise = controller.submit();%0A%0A      expect(promise).toBeUndefined();%0A      expect(message).toBe(%22No ngModel or data defined%22);%0A%0A    %7D);%0A  %7D);%0A
 %7D);%0A

test rsUrl directive handle no data definition