Skip to content

Commit

Permalink
Add task description to notes field of new Asana tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
limulus committed Jan 14, 2015
1 parent cbf09f1 commit ec659c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/AsanaTaskReceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ AsanaTaskReceiver.prototype.configure = function (config) {
AsanaTaskReceiver.prototype.newTask = function (task, cb) {
var taskData = {
"name": task.name(),
"notes": task.description(),
"workspace": this._config.workspaceId,
"projects": [ this._config.projectId ]
}
Expand Down
1 change: 1 addition & 0 deletions test/mock/AsanaMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ AsanaMock.prototype.assertUseBasicAuthCalledWith = function (arg) {

AsanaMock.prototype.assertTaskWasCreated = function (task) {
assert.strictEqual(task.name(), this._tasksCreateCalledWithArg.name)
assert.strictEqual(task.description(), this._tasksCreateCalledWithArg.notes)
}

var Client = function (mock) {
Expand Down
4 changes: 4 additions & 0 deletions test/mock/TaskifierTaskMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ var TaskifierTaskMock = module.exports = function (data) {
TaskifierTaskMock.prototype.name = function () {
return this._data.name
}

TaskifierTaskMock.prototype.description = function () {
return this._data.description
}

0 comments on commit ec659c5

Please sign in to comment.