UNPKG

atlassian-oauth-helper

Version:

Allows simple configuration for Atlassian OAuth consumers using express

25 lines (19 loc) 976 B
var expect = require("chai").expect; describe("Atlassian OAuth helper", function() { var oauth = require("../src/atlassian-oauth-helper"); it("should be an object", function() { expect(oauth).to.be.an("object"); }); it("should expose a method called 'configure' for configuring the oauth helper", function() { expect(oauth.configure).to.be.a("function"); }); it("should expose a method called 'get' for making oauth requests", function() { expect(oauth.get).to.be.a("function"); }); it("should expose an express router called 'requestTokenRouter', that can be mounted in an express app to request oauth tokens", function() { expect(oauth.requestTokenRouter).to.be.a("function"); }); it("should expose an express router called 'accessTokenRouter', that can be mounted in an express app to authorize oauth tokens", function() { expect(oauth.accessTokenRouter).to.be.a("function"); }); });