Socket
Socket
Sign inDemoInstall

drip-nodejs

Package Overview
Dependencies
47
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

2

lib/index.js

@@ -25,3 +25,3 @@ var Accounts = require('./accounts')

"content-type": "application/vnd.api+json",
"authorization": this.token,
"authorization": "Basic " + new Buffer(this.token).toString('base64'),
"User-Agent": "Drip NodeJS Wrapper"

@@ -28,0 +28,0 @@ }

{
"name": "drip-nodejs",
"version": "0.0.6",
"version": "0.0.7",
"description": "A complete NodeJS wrapper for connecting to the Drip v2 REST API",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -6,11 +6,22 @@ 'use strict';

describe('Client', function () {
it('should contain the correct headers', function () {
var client = new Client({ token: 'abc123' });
expect(client.token).toEqual('abc123');
expect(client.headers).toEqual({
"content-type": "application/vnd.api+json",
"authorization": 'abc123',
"User-Agent": "Drip NodeJS Wrapper"
});
var token = 'abc123';
it('should have token attribute', function () {
var client = new Client({ token: token });
expect(client.token).toEqual(token);
});
it('should add content-type header', function () {
var client = new Client({ token: token });
expect(client.headers["content-type"]).toEqual("application/vnd.api+json");
});
it('should add basic auth authorization header', function () {
var client = new Client({ token: token });
expect(client.headers.authorization).toEqual("Basic " + new Buffer(token).toString('base64'));
});
it('should add user-agent header', function () {
var client = new Client({ token: token });
expect(client.headers["User-Agent"]).toEqual("Drip NodeJS Wrapper");
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc