diff --git a/core/server/services/channels/config.channels.json b/core/server/services/channels/config.channels.json index 0948142ac5..9319e48902 100644 --- a/core/server/services/channels/config.channels.json +++ b/core/server/services/channels/config.channels.json @@ -24,7 +24,7 @@ "author": { "route": "/:t_author/:slug/", "postOptions": { - "filter": "author:'%s'" + "filter": "authors:'%s'" }, "data": { "author": { diff --git a/core/test/integration/api/api_posts_spec.js b/core/test/integration/api/api_posts_spec.js index aeda0a706c..e8ccfcb701 100644 --- a/core/test/integration/api/api_posts_spec.js +++ b/core/test/integration/api/api_posts_spec.js @@ -60,6 +60,14 @@ describe('Post API', function () { should.exist(PostAPI); describe('Browse', function () { + beforeEach(function () { + return db.knex('posts_authors').insert({ + id: ObjectId.generate(), + post_id: testUtils.DataGenerator.forKnex.posts[0].id, + author_id: testUtils.DataGenerator.forKnex.users[1].id + }); + }); + beforeEach(function () { localSettingsCache.permalinks = '/:slug/'; }); @@ -388,6 +396,8 @@ describe('Post API', function () { post.primary_author.slug.should.eql('joe-bloggs'); }); + _.find(results.posts, {id: testUtils.DataGenerator.forKnex.posts[0].id}).authors.length.should.eql(2); + done(); }).catch(done); });