Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/models/task.js2
-rw-r--r--tests/models/task.spec.js7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/models/task.js b/src/models/task.js
index d015ace1..8459e88a 100644
--- a/src/models/task.js
+++ b/src/models/task.js
@@ -197,7 +197,7 @@ export default class Task {
* @memberof Task
*/
set uid(uid) {
- this.vCalendar.updatePropertyWithValue('uid', uid)
+ this.vtodo.updatePropertyWithValue('uid', uid)
this._uid = this.vtodo.getFirstPropertyValue('uid') || ''
return true
}
diff --git a/tests/models/task.spec.js b/tests/models/task.spec.js
index d25423d7..66e0d774 100644
--- a/tests/models/task.spec.js
+++ b/tests/models/task.spec.js
@@ -63,4 +63,11 @@ describe('task', () => {
expect(task.complete).toBeLessThan(100)
expect(task.completed).toEqual(false)
})
+
+ it('Should set and get the uid', () => {
+ const task = new Task(vCalendar, {})
+ expect(task.uid).toEqual('pwen4kz18g')
+ task.uid = 'pwen4kz19g'
+ expect(task.uid).toEqual('pwen4kz19g')
+ })
})