Permalink
Browse files

[minor] lint/style cleanup

  • Loading branch information...
1 parent bdb886e commit 0577765aa74b21b2a22c7884836a783d4eb9a90f @mcavage mcavage committed Feb 26, 2014
Showing with 9 additions and 10 deletions.
  1. +9 −10 test/server.test.js
View
@@ -328,7 +328,7 @@ test('OPTIONS', function (t) {
}).end();
});
-test('CORS Preflight - valid origin', function(t) {
+test('CORS Preflight - valid origin', function (t) {
SERVER.use(restify.CORS({
credentials: true,
origins: [ 'http://somesite.local' ]
@@ -342,22 +342,21 @@ test('CORS Preflight - valid origin', function(t) {
method: 'OPTIONS',
agent: false,
headers: {
- "Access-Control-Request-Headers": "accept, content-type",
- "Access-Control-Request-Method": "POST",
- "Origin": 'http://somesite.local',
+ 'Access-Control-Request-Headers': 'accept, content-type',
+ 'Access-Control-Request-Method': 'POST',
+ 'Origin': 'http://somesite.local'
}
};
http.request(opts, function (res) {
t.equal(res.headers['access-control-allow-origin'],
- 'http://somesite.local'
- );
+ 'http://somesite.local');
t.equal(res.headers['access-control-allow-credentials'], 'true');
t.equal(res.statusCode, 200);
t.end();
}).end();
});
-test('CORS Preflight - invalid origin', function(t) {
+test('CORS Preflight - invalid origin', function (t) {
SERVER.use(restify.CORS({
credentials: true,
origins: [ 'http://somesite.local' ]
@@ -371,9 +370,9 @@ test('CORS Preflight - invalid origin', function(t) {
method: 'OPTIONS',
agent: false,
headers: {
- "Access-Control-Request-Headers": "accept, content-type",
- "Access-Control-Request-Method": "POST",
- "Origin": 'http://othersite.local',
+ 'Access-Control-Request-Headers': 'accept, content-type',
+ 'Access-Control-Request-Method': 'POST',
+ 'Origin': 'http://othersite.local'
}
};
http.request(opts, function (res) {

0 comments on commit 0577765

Please sign in to comment.