|
@@ -187,8 +187,8 @@ sub test_create_activity {
|
187
|
187
|
|
188
|
188
|
sub test_activity_remove {
|
189
|
189
|
my ($this, $activity) = @_;
|
190
|
|
- return $activity->remove;
|
191
|
|
- return $this->assertEqual( $ractivity->{data}{id}, $activity->{id} );
|
|
190
|
+ $activity->remove;
|
|
191
|
+ return $this->assertNotEqual( $ractivity->{data}{id}, $activity->{id} );
|
192
|
192
|
}
|
193
|
193
|
|
194
|
194
|
sub test_activity_exists {
|
|
@@ -203,4 +203,29 @@ sub test_activity_not_exists {
|
203
|
203
|
return $this->assertNotEqual( $ractivity->{data}{id}, $activity->{id} );
|
204
|
204
|
}
|
205
|
205
|
|
|
206
|
+sub test_create_task {
|
|
207
|
+ my ($this, $task) = @_;
|
|
208
|
+ my $res = $task->create;
|
|
209
|
+ return $this->assertEqual( $res->{data}{attributes}{name}, $task->{name} );
|
|
210
|
+}
|
|
211
|
+
|
|
212
|
+sub test_task_exists {
|
|
213
|
+ my ($this, $task) = @_;
|
|
214
|
+ my $rtask = $task->fetch;
|
|
215
|
+ return $this->assertEqual( $rtask->{data}{id}, $task->{id} );
|
|
216
|
+}
|
|
217
|
+
|
|
218
|
+sub test_task_not_exists {
|
|
219
|
+ my ($this, $task) = @_;
|
|
220
|
+ my $rtask = $task->fetch;
|
|
221
|
+ eval {exists $rtask->{data}{id}};
|
|
222
|
+ return $this->assertNotEqual( $@, 0 );
|
|
223
|
+}
|
|
224
|
+
|
|
225
|
+sub test_task_remove {
|
|
226
|
+ my ($this, $task) = @_;
|
|
227
|
+ my $rtask = $task->remove;
|
|
228
|
+ return $this->assertNotEqual( $rtask->{data}{id}, $task->{id} );
|
|
229
|
+}
|
|
230
|
+
|
206
|
231
|
return 1;
|