Sha256: 733b3eb846c8b2e3bc234fe13339640c5909600c5e38471b2b841dc420f27525
Contents?: true
Size: 842 Bytes
Versions: 19
Compression:
Stored size: 842 Bytes
Contents
var server = require('./server') , events = require('events') , assert = require('assert') , request = require('../index') ; var local = 'http://localhost:8888/asdf' try { request({uri:local, body:{}}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.body.') } try { request({uri:local, multipart: 'foo'}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.multipart.') } try { request({uri:local, multipart: [{}]}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Body attribute missing in multipart.') } try { request(local, {multipart: [{}]}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Body attribute missing in multipart.') } console.log("All tests passed.")
Version data entries
19 entries across 19 versions & 1 rubygems