Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbatista committed Sep 24, 2017
1 parent 5fe01ae commit 1ba254b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
},
"keywords": [],
"dependencies": {
"agenda": "^0.9.0",
"agenda": "^1.0.0",
"bluebird": "^3.5.0",
"debug": "^2.2.0"
"debug": "^3.0.1"
},
"devDependencies": {
"chai": "^3.5.0",
Expand All @@ -32,7 +32,7 @@
"gulp-istanbul": "^1.1.1",
"gulp-load-plugins": "^1.4.0",
"gulp-mocha": "^3.0.0",
"loopback": "^2.29.1",
"loopback": "^3.11.1",
"should": "^11.1.0"
},
"scripts": {
Expand Down
22 changes: 13 additions & 9 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ var AgendaConnector = require('../');
var app = loopback();

describe('Loopback Agenda Connector', function() {
var QueueJob, ds;
var QueueJob;

before(function() {
ds = loopback.createDataSource({connector: AgendaConnector});
QueueJob = app.model('QueueJob', {dataSource: ds, public: false});
app.dataSource('agenda', {connector: AgendaConnector});
QueueJob = app.registry.createModel({
name: 'Agenda',
});
app.model(QueueJob, {dataSource: 'agenda'});
return QueueJob.delete();
});

Expand All @@ -19,7 +22,7 @@ describe('Loopback Agenda Connector', function() {
});

after(function() {
return ds.disconnect();
return app.dataSources.agenda.disconnect();
});

it('Create job to be run now', function(done) {
Expand Down Expand Up @@ -217,11 +220,12 @@ describe('Loopback Agenda Connector', function() {
.then(function(job) {
expect(job).to.exist();
expect(job.attrs._id).to.exist();
return QueueJob.find({'data.text': 'Ciao'}).then(function(jobs) {
expect(jobs).to.be.instanceOf(Array);
expect(jobs.length).to.be.equal(1);
expect(jobs[0].attrs.data.text).to.be.equal('Ciao');
});
return QueueJob.find({'data.text': 'Ciao'})
.then(function(jobs) {
expect(jobs).to.be.instanceOf(Array);
expect(jobs.length).to.be.equal(1);
expect(jobs[0].attrs.data.text).to.be.equal('Ciao');
});
});
});
});

0 comments on commit 1ba254b

Please sign in to comment.