From 97f329eb6dd95ee9ae439b8956838f09e91e1303 Mon Sep 17 00:00:00 2001 From: sigita42 Date: Sun, 10 May 2015 15:44:56 +0200 Subject: [PATCH] Add test for subscribe on single object --- angular-meteor/angular-meteor-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/angular-meteor/angular-meteor-tests.ts b/angular-meteor/angular-meteor-tests.ts index be75f196bf..9ce0a33e90 100644 --- a/angular-meteor/angular-meteor-tests.ts +++ b/angular-meteor/angular-meteor-tests.ts @@ -18,6 +18,7 @@ interface CustomScope extends angular.meteor.IScope { todo: ITodo; todoNotAuto: TodoAngularMeteorObject; + todoSubscribed: TodoAngularMeteorObject; save: (todo: ITodo) => void; saveAll: () =>void; @@ -48,6 +49,7 @@ app.controller("mainCtrl", ['$scope', '$meteor', ($scope: CustomScope, $meteor: $scope.notAutoTodos = $meteor.collection(Todos, false).subscribe("publicTodos"); $scope.todoNotAuto = $meteor.object(Todos, 'TodoID', false); + $scope.todoSubscribed = $meteor.object(Todos, 'TodoID').subscribe('todos'); $scope.todo = $scope.todoNotAuto.getRawObject(); $scope.todoNotAuto.reset(); $scope.todoNotAuto.save($scope.todo).then((data) => { return data == 1; });;