Created
June 8, 2015 19:20
-
-
Save armandomiani/d19bcb6ad9001191b71b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createJob = function(callback) { | |
var url = get_service_url('', '/rest/v1/job/create'); | |
var params = { | |
'contact_email': '[email protected]', | |
'contact_name': 'Armando Miani', | |
'contact_phone': '19999385915', | |
'address': 'Alameda Franca, 1222, Jardim Paulista, São Paulo', | |
'description': 'I want nice pictures or else I will not pay.', | |
'schedules': '2015-06-13 10:00:00, 2015-06-15 12:00:00, 2015-06-17 14:00:00', | |
'origin_id': '666' | |
}; | |
frisby.create('Create job') | |
.post(url, params) | |
.expectStatus(200) | |
.expectHeaderContains('Content-type', 'application/json') | |
.afterJSON(function(result) { | |
if (typeof(callback) === "function") callback(result); | |
}) | |
.toss(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment