New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fulcrum-app

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fulcrum-app - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test/objects/project.json

4

lib/api/projects.js

@@ -16,3 +16,7 @@ var _ = require('lodash');

_.extend(Projects.prototype, mixins.searchable);
_.extend(Projects.prototype, mixins.findable);
_.extend(Projects.prototype, mixins.creatable);
_.extend(Projects.prototype, mixins.updatable);
_.extend(Projects.prototype, mixins.deletable);
module.exports = Projects;

2

package.json
{
"name": "fulcrum-app",
"version": "1.0.0",
"version": "1.1.0",
"description": "JavaScript wrapper for the Fulcrum API",

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

@@ -8,2 +8,14 @@ var assert = require('assert');

describe('Projects', function(){
describe('#find()', function(){
it('should return a project.', function(done){
var nocker = nock('https://api.fulcrumapp.com')
.get('/api/v2/projects/d68c7034-9f5c-4045-b374-d4952ec9d9eb')
.replyWithFile(200, __dirname + '/objects/project.json');
client.projects.find('d68c7034-9f5c-4045-b374-d4952ec9d9eb', function(error, project) {
assert.ifError(error);
assert.equal(project.project.id, 'd68c7034-9f5c-4045-b374-d4952ec9d9eb', 'project.id is incorrect.');
done();
});
});
});

@@ -24,2 +36,51 @@ describe('#search()', function(){

describe('#delete()', function(){
it('should not return an error if deleted.', function(done){
var nocker = nock('https://api.fulcrumapp.com')
.delete('/api/v2/projects/d68c7034-9f5c-4045-b374-d4952ec9d9eb')
.reply(204);
client.projects.delete('d68c7034-9f5c-4045-b374-d4952ec9d9eb', function(error) {
assert.ifError(error);
done();
});
});
it('should return an error if no project is found.', function(done){
var nocker = nock('https://api.fulcrumapp.com')
.delete('/api/v2/projects/d68c7034-9f5c-4045-b374-d4952ec9d9eb')
.reply(404);
client.projects.delete('d68c7034-9f5c-4045-b374-d4952ec9d9eb', function(error) {
assert(error, 'error is not an error.');
done();
});
});
});
describe('#create()', function(){
it('should return a project.', function(done){
var project_to_post = JSON.parse(fs.readFileSync(__dirname + '/objects/project.json'));
var nocker = nock('https://api.fulcrumapp.com')
.post('/api/v2/projects', project_to_post)
.replyWithFile(201, __dirname + '/objects/project.json');
client.projects.create(project_to_post, function(error, project) {
assert.ifError(error);
assert.equal(project.project.id, 'd68c7034-9f5c-4045-b374-d4952ec9d9eb', 'project.id is incorrect.');
done();
});
});
});
describe('#update()', function(){
it('should return a project.', function(done){
var project_to_put = JSON.parse(fs.readFileSync(__dirname + '/objects/project.json'));
var nocker = nock('https://api.fulcrumapp.com')
.put('/api/v2/projects/d68c7034-9f5c-4045-b374-d4952ec9d9eb', project_to_put)
.replyWithFile(200, __dirname + '/objects/project.json');
client.projects.update('d68c7034-9f5c-4045-b374-d4952ec9d9eb', project_to_put, function(error, project) {
assert.ifError(error);
assert.equal(project.project.id, 'd68c7034-9f5c-4045-b374-d4952ec9d9eb', 'project.id is incorrect.');
done();
});
});
});
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc