Created
July 5, 2017 20:50
-
-
Save zladuric/39fb3f4d9b81a97432e6464de20a6935 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
it('should upload a file', function() { | |
const request = require('request'); | |
const headers = { | |
'Accept': '*/*', | |
'Origin': 'http://localhost:5555', | |
'x-amz-acl': 'public-read', | |
'Content-Type': 'video/quicktime', | |
}; | |
const options = { | |
headers, | |
method: 'PUT', | |
url, | |
body: fs.readFileSync('./video.mp4'), | |
}; | |
request(options, function (err, res) { | |
if (err) { | |
return done(err); | |
} | |
res.statusCode.should.equal(200); | |
done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment