From 04cbad35fdcf2bcf3c609d0edbd9b08f20fe650e Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Sat, 4 Feb 2012 22:17:27 +0800 Subject: [PATCH] Remove unnecesare code from test helper --- package.json | 2 +- test/spec_helper.js | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/package.json b/package.json index 76f2c4c5..fb12162d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jugglingdb", "author": "Anatoliy Chakkaev", "description": "ORM for every database: redis, mysql, neo4j, mongodb, postgres, sqlite", - "version": "0.0.8", + "version": "0.1.0", "repository": { "url": "https://github.com/1602/jugglingdb" }, diff --git a/test/spec_helper.js b/test/spec_helper.js index e103306c..5e02b7f0 100644 --- a/test/spec_helper.js +++ b/test/spec_helper.js @@ -46,25 +46,3 @@ function check_external_exports() { 'require("spec_helper").init(exports); called'); } -// add assertions - -var assert = require(require('module')._resolveFilename('../support/nodeunit')[0].replace(/index\.js$/, 'lib/assert')); - -// Check response status code 200 OK -assert.status200 = function (response, message) { - if (response.statusCode !== 200) { - assert.fail(response.statusCode, 200, message || 'Status code is not 200', '===', assert.status200); - } -} - -// Check redirection -assert.redirect = function (response, path, message) { - if (response.statusCode !== 302) { - assert.fail(response.statusCode, 302, 'Status code is not 302', '===', assert.redirect); - } - var realPath = require('url').parse(response.headers.location).pathname; - if (realPath !== path) { - assert.fail(realPath, path, message || 'Wrong location', '===', assert.redirect); - } -} -