Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Olivera committed Apr 27, 2018
2 parents 769b1bb + 19563d2 commit 792caba
Show file tree
Hide file tree
Showing 5 changed files with 5,632 additions and 169 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podcloud-feeds",
"version": "1.1.0",
"version": "1.1.2",
"description": "GraphQL API for podcloud",
"scripts": {
"test": "NODE_ENV=test mocha --opts test/mocha.opts",
Expand Down
1 change: 1 addition & 0 deletions src/schema/types/resolvers/podcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const ItemFields = [
"_id",
"title",
"content",
"author",
"published_at",
"enclosure",
"_slugs"
Expand Down
34 changes: 34 additions & 0 deletions test/src/connectors/item.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Item from "~/connectors/item"

import chai from "chai"
import chaiAsPromised from "chai-as-promised"

import MongoHelper from "#/helpers/mongodb.helper"

chai.use(chaiAsPromised)
const expect = chai.expect

describe("Item", () => {
before(done => {
MongoHelper.setup(done)
})

it.only("should have author", done => {
Item.find({}).exec(function(err, items) {
if (err) {
console.error(err)
throw err
} else {
console.log(items[0])
expect(items).to.be.an("array").that.is.not.empty
expect(items[0]).to.be.an("object")
expect(items[0].author).to.be.a("string").that.is.not.empty
}
done()
})
})

after(done => {
MongoHelper.tearDown(done)
})
})
Loading

0 comments on commit 792caba

Please sign in to comment.