var _                 = require("lodash")
  , expect            = require("chai").expect
  , ubivar            = require("../../ubivar")
  , methods           = ["create","retrieve","del","list"]

describe("FlowBackup", function(){
  describe("Properties", function(){
    it("Should have a name and path attribute", function() {
      expect(ubivar["FlowBackup"]["path"]).to.exist
    })

    it("Should link to parent (ubivar)", function() {
      expect(ubivar["FlowBackup"]["ubivar"]).to.exist
    })

    _.each(methods, function(method){
      var METHOD      = method.toUpperCase()
      it("Should have "+METHOD+" methods", function(done) {
        if(!_.isFunction(ubivar["FlowBackup"][method])){
          return done(new Error("Should have "+METHOD+" methods"))
        }
        done()
      })
    })
  })


  describe("Methods", function(){

    it.skip("Should create a flow backup", function(todo){ todo() })

    it.skip("Should retrieve (restore) a flow backup", function(todo){ todo() })

    it.skip("Should delete a flow backup", function(todo){ todo() })

    it("Should list", function(done){
      ubivar["FlowBackup"].list(function(err, res){
        if(err) {
          console.log(err, res)
          done(err) 
        } else {
          done()
        }
      })
    })
  })
})

@@ -847,37 +847,32 @@
 ction()%7B%0A%0A    it
-.skip
 (%22Should create 
@@ -892,37 +892,227 @@
 %22, function(
-todo)%7B todo()
+done)%7B %0A      ubivar%5B%22FlowBackup%22%5D.create(function(err, res)%7B%0A        if(err)%7B done(new Error(%22Did not create%22)) %7D%0A%0A        var flows     = res.data%0A        console.log(flows)%0A        done()%0A      %7D)%0A   
  %7D)%0A%0A    it.

add flows