mirror of
https://github.com/LukeHagar/plex-api-oauth.git
synced 2025-12-09 12:37:50 +00:00
Node_modules
This commit is contained in:
29
node_modules/plex-oauth/build/test/index.spec.js
generated
vendored
Normal file
29
node_modules/plex-oauth/build/test/index.spec.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var src_1 = require("../src");
|
||||
describe("Module", function () {
|
||||
var plexOauth = new src_1.PlexOauth({
|
||||
clientIdentifier: "dhjoasoidjapoiwdmamlw",
|
||||
device: "TEST DEVICE",
|
||||
product: "TEST DEVICE",
|
||||
version: "1",
|
||||
forwardUrl: "https://localhost/"
|
||||
});
|
||||
it("loads and initializes", function () {
|
||||
expect(plexOauth).toBeDefined();
|
||||
});
|
||||
it("returns a hosted ui link and poll for an auth token", function () {
|
||||
plexOauth.requestHostedLoginURL().then(function (response) {
|
||||
var hostedUiLink = response[0], pinId = response[1];
|
||||
expect(hostedUiLink).toBeDefined();
|
||||
expect(hostedUiLink).toContain("https://app.plex.tv/auth");
|
||||
expect(hostedUiLink).not.toContain("undefined");
|
||||
expect(hostedUiLink).not.toContain("null");
|
||||
plexOauth.checkForAuthToken(pinId, 1000, 1).then(function (pinResponse) {
|
||||
var authToken = pinResponse;
|
||||
expect(authToken).toBeNull();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=index.spec.js.map
|
||||
Reference in New Issue
Block a user