Initial projects implementation

This commit is contained in:
Nick O'Leary
2017-09-20 10:30:07 +01:00
parent 9a8b404054
commit b1cd13d629
49 changed files with 2711 additions and 420 deletions

View File

@@ -23,7 +23,7 @@ var when = require('when');
var flow = require("../../../../red/api/admin/flow");
describe("flow api", function() {
describe("api/admin/flow", function() {
var app;

View File

@@ -23,7 +23,7 @@ var when = require('when');
var flows = require("../../../../red/api/admin/flows");
describe("flows api", function() {
describe("api/admin/flows", function() {
var app;

View File

@@ -24,7 +24,7 @@ var app = express();
var info = require("../../../../red/api/admin/info");
var theme = require("../../../../red/api/editor/theme");
describe("info api", function() {
describe("api/admin/info", function() {
describe("settings handler", function() {
before(function() {
sinon.stub(theme,"settings",function() { return { test: 456 };});

View File

@@ -24,7 +24,7 @@ var when = require('when');
var nodes = require("../../../../red/api/admin/nodes");
var apiUtil = require("../../../../red/api/util");
describe("nodes api", function() {
describe("api/admin/nodes", function() {
var app;
function initNodes(runtime) {

View File

@@ -17,7 +17,7 @@
var should = require("should");
var Clients = require("../../../../red/api/auth/clients");
describe("Clients", function() {
describe("api/auth/clients", function() {
it('finds the known editor client',function(done) {
Clients.get("node-red-editor").then(function(client) {
client.should.have.property("id","node-red-editor");
@@ -41,7 +41,6 @@ describe("Clients", function() {
}).catch(function(err) {
done(err);
});
});
});

View File

@@ -24,7 +24,7 @@ var auth = require("../../../../red/api/auth");
var Users = require("../../../../red/api/auth/users");
var Tokens = require("../../../../red/api/auth/tokens");
describe("api auth middleware",function() {
describe("api/auth/index",function() {

View File

@@ -17,7 +17,7 @@
var should = require("should");
var permissions = require("../../../../red/api/auth/permissions");
describe("Auth permissions", function() {
describe("api/auth/permissions", function() {
describe("hasPermission", function() {
it('a user with no permissions',function() {
permissions.hasPermission([],"*").should.be.false();

View File

@@ -23,7 +23,7 @@ var Users = require("../../../../red/api/auth/users");
var Tokens = require("../../../../red/api/auth/tokens");
var Clients = require("../../../../red/api/auth/clients");
describe("Auth strategies", function() {
describe("api/auth/strategies", function() {
before(function() {
strategies.init({log:{audit:function(){}}})
});

View File

@@ -21,7 +21,7 @@ var sinon = require("sinon");
var Tokens = require("../../../../red/api/auth/tokens");
describe("Tokens", function() {
describe("api/auth/tokens", function() {
describe("#init",function() {
it('loads sessions', function(done) {
Tokens.init({}).then(done);

View File

@@ -20,7 +20,7 @@ var sinon = require('sinon');
var Users = require("../../../../red/api/auth/users");
describe("Users", function() {
describe("api/auth/users", function() {
describe('Initalised with a credentials object, no anon',function() {
before(function() {
Users.init({

View File

@@ -0,0 +1,19 @@
/**
* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
describe("api/editor/projects", function() {
it.skip("NEEDS TESTS WRITING",function() {});
});