Sha256: d1b85910171abfb0d3df5b242032270bd2e52717e9c17ae329f1ac2f85270f58

Contents?: true

Size: 854 Bytes

Versions: 17

Compression:

Stored size: 854 Bytes

Contents

var http = require('http');
var assert = require('assert');
var methods = require('..');

describe('methods', function() {

  if (http.METHODS) {

    it('is a lowercased http.METHODS', function() {
      var lowercased = http.METHODS.map(function(method) {
        return method.toLowerCase();
      });
      assert.deepEqual(lowercased, methods);
    });

  } else {

    it('contains GET, POST, PUT, and DELETE', function() {
      assert.notEqual(methods.indexOf('get'), -1);
      assert.notEqual(methods.indexOf('post'), -1);
      assert.notEqual(methods.indexOf('put'), -1);
      assert.notEqual(methods.indexOf('delete'), -1);
    });

    it('is all lowercase', function() {
      for (var i = 0; i < methods.length; i ++) {
        assert(methods[i], methods[i].toLowerCase(), methods[i] + " isn't all lowercase");
      }
    });

  }

});

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/method-override/node_modules/methods/test/methods.js