Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ISSUE #26] added regression test against foobar3000

  • Loading branch information...
commit 61c763fa5dc348053cd69faaafde55033f9b9956 1 parent f8bc7d9
@coolaj86 authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 tests/get-content-length-of-unicode-string.js
View
23 tests/get-content-length-of-unicode-string.js
@@ -0,0 +1,23 @@
+(function () {
+ "use strict";
+
+ var request = require('ahr2')
+ , assert = require('assert')
+ , hasUnicode
+ ;
+
+ hasUnicode = {
+ "87dbe29b-1f21-4ad5-bab2-c81c6cc044a3": {
+ "name": "18 - If I Ain’t Got You (Live).mp3",
+ "relativePath": "/Users/coolaj86/Downloads/Maroon 5/Hands All Over",
+ "lastModificationDate": "2012-03-01T15:53:28.000Z",
+ "size": 9663094
+ }
+ };
+
+ request.post('http://foobar3000.com/echo/echo.json', null, hasUnicode).when(function (err, ahr, data) {
+ assert.ok(!err, 'should not have parse error error: ' + err + String(data));
+ assert.ok(data['87dbe29b-1f21-4ad5-bab2-c81c6cc044a3']);
+ });
+
+}());
Please sign in to comment.
Something went wrong with that request. Please try again.