mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed errors being logged by unit tests
refs: https://github.com/TryGhost/Toolbox/issues/389
This commit is contained in:
parent
880f8c2802
commit
47d9b4a51d
2 changed files with 9 additions and 3 deletions
|
@ -41,13 +41,19 @@ describe('Scheduling: Post Scheduler', function () {
|
|||
}));
|
||||
nock('http://scheduler.local:1111')
|
||||
.get(() => true)
|
||||
.query(true)
|
||||
.reply(200);
|
||||
nock('http://scheduler.local:1111')
|
||||
.post(() => true)
|
||||
.query(true)
|
||||
.reply(200);
|
||||
nock('http://scheduler.local:1111')
|
||||
.put(() => true)
|
||||
.query(true)
|
||||
.reply(200);
|
||||
|
||||
new PostScheduler({
|
||||
apiUrl: 'scheduler.local:1111/',
|
||||
apiUrl: 'http://scheduler.local:1111/',
|
||||
integration: {
|
||||
api_keys: [{
|
||||
id: 'integrationUniqueId',
|
||||
|
@ -71,7 +77,7 @@ describe('Scheduling: Post Scheduler', function () {
|
|||
adapter.schedule.calledOnce.should.eql(true);
|
||||
|
||||
adapter.schedule.args[0][0].time.should.equal(moment(post.get('published_at')).valueOf());
|
||||
adapter.schedule.args[0][0].url.should.startWith(urlUtils.urlJoin('scheduler.local:1111/', 'schedules', 'posts', post.get('id'), '?token='));
|
||||
adapter.schedule.args[0][0].url.should.startWith(urlUtils.urlJoin('http://scheduler.local:1111/', 'schedules', 'posts', post.get('id'), '?token='));
|
||||
adapter.schedule.args[0][0].extra.httpMethod.should.eql('PUT');
|
||||
should.equal(null, adapter.schedule.args[0][0].extra.oldTime);
|
||||
});
|
||||
|
|
|
@ -61,7 +61,7 @@ describe('TwitterOEmbedProvider', function () {
|
|||
});
|
||||
|
||||
nock('https://api.twitter.com')
|
||||
.get('/2/tweets/')
|
||||
.get('/2/tweets/1630581157568839683')
|
||||
.query(true)
|
||||
.reply(200, {
|
||||
data: {
|
||||
|
|
Loading…
Add table
Reference in a new issue