| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -602,7 +602,7 @@ | |||
| 602 | 602 | // Returns a callback which fulfills promise | |
| 603 | 603 | this.fulfill = function (deferred, boundError, boundResult) { | |
| 604 | 604 | return function (err, result) { | |
| 605 | - if (err) deferred.reject(boundError === null ? err : boundError);else if (typeof boundResult == "function") deferred.resolve(boundResult === null ? result : boundResult(result));else deferred.resolve(boundResult === null ? result : boundResult); | ||
| 605 | + if (err) deferred.reject(boundError == null ? err : boundError);else if (typeof boundResult == "function") deferred.resolve(boundResult == null ? result : boundResult(result));else deferred.resolve(boundResult == null ? result : boundResult); | ||
| 606 | 606 | }; | |
| 607 | 607 | }; | |
| 608 | 608 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,11 +58,11 @@ angularMeteorUtils.service('$meteorUtils', [ | |||
| 58 | 58 | this.fulfill = function(deferred, boundError, boundResult) { | |
| 59 | 59 | return function(err, result) { | |
| 60 | 60 | if (err) | |
| 61 | - deferred.reject(boundError === null ? err : boundError); | ||
| 61 | + deferred.reject(boundError == null ? err : boundError); | ||
| 62 | 62 | else if (typeof boundResult == "function") | |
| 63 | - deferred.resolve(boundResult === null ? result : boundResult(result)); | ||
| 63 | + deferred.resolve(boundResult == null ? result : boundResult(result)); | ||
| 64 | 64 | else | |
| 65 | - deferred.resolve(boundResult === null ? result : boundResult); | ||
| 65 | + deferred.resolve(boundResult == null ? result : boundResult); | ||
| 66 | 66 | }; | |
| 67 | 67 | }; | |
| 68 | 68 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -497,12 +497,14 @@ describe('$meteorCollection service', function() { | |||
| 497 | 497 | }); | |
| 498 | 498 | ||
| 499 | 499 | it('push updates from client handled correctly', function() { | |
| 500 | - $rootScope.limit = 10; | ||
| 500 | + var $scope = $rootScope.$new(); | ||
| 501 | + $scope.limit = 10; | ||
| 501 | 502 | var $ngCol = $meteorCollection(function() { | |
| 502 | 503 | return DummyCollection.find({}, { | |
| 503 | - limit: $rootScope.getReactively('limit') // TODO is not a function | ||
| 504 | + limit: $scope.getReactively('limit') | ||
| 504 | 505 | }); | |
| 505 | - }); | ||
| 506 | + // A collection with no name can't be found so we'll need to pass it | ||
| 507 | + }, false, DummyCollection); | ||
| 506 | 508 | spyOn($ngCol, 'save'); | |
| 507 | 509 | ||
| 508 | 510 | // Adds docs on the client. | |
@@ -517,12 +519,14 @@ describe('$meteorCollection service', function() { | |||
| 517 | 519 | }); | |
| 518 | 520 | ||
| 519 | 521 | it('remove updates from client handled correctly', function() { | |
| 520 | - $rootScope.limit = 10; | ||
| 522 | + var $scope = $rootScope.$new(); | ||
| 523 | + $scope.limit = 10; | ||
| 521 | 524 | var $ngCol = $meteorCollection(function() { | |
| 522 | 525 | return DummyCollection.find({}, { | |
| 523 | - limit: $rootScope.getReactively('limit') // TODO is not a function | ||
| 526 | + limit: $scope.getReactively('limit') | ||
| 524 | 527 | }); | |
| 525 | - }); | ||
| 528 | + // A collection with no name can't be found so we'll need to pass it | ||
| 529 | + }, false, DummyCollection); | ||
| 526 | 530 | spyOn($ngCol, 'remove').and.callThrough(); | |
| 527 | 531 | ||
| 528 | 532 | // Removes last two docs on the client. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,12 +51,12 @@ Package.onTest(function(api) { | |||
| 51 | 51 | 'integration/pre1.3/angular-meteor-get-updates-spec.js', | |
| 52 | 52 | 'integration/pre1.3/angular-meteor-diff-array-spec.js', | |
| 53 | 53 | 'integration/pre1.3/angular-meteor-camera-spec.js', | |
| 54 | - // 'integration/pre1.3/angular-meteor-collection-spec.js' // contains two failing tests (check todo) | ||
| 54 | + 'integration/pre1.3/angular-meteor-collection-spec.js', | ||
| 55 | 55 | 'integration/pre1.3/angular-meteor-methods-spec.js', | |
| 56 | 56 | 'integration/pre1.3/angular-meteor-object-spec.js', | |
| 57 | 57 | 'integration/pre1.3/angular-meteor-session-spec.js', | |
| 58 | 58 | 'integration/pre1.3/angular-meteor-stopper-spec.js', | |
| 59 | - 'integration/pre1.3/angular-meteor-subscribe-spec.js' | ||
| 60 | - // 'integration/pre1.3/angular-meteor-utils-spec.js' // contains three failing tests | ||
| 59 | + 'integration/pre1.3/angular-meteor-subscribe-spec.js', | ||
| 60 | + 'integration/pre1.3/angular-meteor-utils-spec.js' | ||
| 61 | 61 | ], 'client'); | |
| 62 | 62 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments