     new models.Dotstorm({
       slug: "test"
     }).save (err) ->
-      expect(err).to.be null
+      expect(err).to.be(null)
       models.Dotstorm.findOne {slug: "test"}, (err, doc) ->
-        expect(err).to.be null
+        expect(err).to.be(null)
         expect(doc.slug).to.eql "test"
         done()
 
   it "creates an idea", (done) ->
     models.Dotstorm.findOne {slug: "test"}, (err, dotstorm) =>
+      expect(err).to.be(null)
+      expect(dotstorm).to.not.be(null)
       @dotstorm = dotstorm
       idea = new models.Idea({
         dotstorm_id: dotstorm._id

    models.Idea.findOne {dotstorm_id: @dotstorm._id}, (err, idea) =>
      expect(fs.existsSync idea.getDrawingPath("small")).to.be true
      idea.remove (err) =>
        expect(err).to.be null
        expect(fs.existsSync idea.getDrawingPath("small")).to.be false
        done()


  it "saves tags", (done) ->
    models.Idea.findOne {dotstorm_id: @dotstorm._id}, (err, idea) =>
      expect(err).to.be(null)
      idea.set("taglist", "this, that, theother")
      expect(_.isEqual idea.tags, ["this", "that", "theother"]).to.be true
      tagset = ["one", "two", "three"]
      idea.set("tags", tagset)
      expect(_.isEqual idea.tags, tagset).to.be true
      idea.save (err) ->
        expect(err).to.be(null)
        models.Idea.findOne {_id: idea._id}, (err, doc) ->
          expect(err).to.be(null)
          expect(doc).to.not.be(null)
          expect(_.isEqual tagset, doc.tags).to.be true
      done()

