'use strict'
var request = require('request')
var fs = require('fs')
var os = require('os')
var should = require('should')
var utility = require('../public/utility')
let path = require('path')
var api
var url

describe('Server: Web', function () {

  before(function (done) {
    url = 'http://localhost:8085/api'
    done()
  })

  after(function (done) {
    done()
  })

  var resres
  var Body = {accountHashID: 'mohammad', statusCode: 'Sample2', serviceCaller: 'Sample1', moduleCaller: 'Sample1', actionType:'Sample1', time:1234567890, logMessage:'this is success', objectInfo:'this object has not f ing info!!'}
  it ('HTTP Verbs should work: Post with JSON Payload as body', function(done) {

    request.post(url + '/1/monitor', {'body': JSON.stringify(Body), 'headers': {'Content-type': 'application/json'}}, function (error, response, body) {
      if (error) {
        console.log(error)
        should.not.exist(error)
      }
      body = JSON.parse(body)
      if (body.result) {
        resres = body.result.monitorHashID
        done()
      }
    })
  })

  it ('Get with accountHashID', function(done) {
    request.get(url + '/1/monitor/' + resres + '?accountHashID=mohammad', function (error, response, body) {
      if (error){
        console.log(error)
        should.not.exist(error)
      }
      body = JSON.parse(body)
      body.result.accountHashID = 'mohammad'
      if (utility.objectCompare(body.result , Body)) {
        done()
      }
    })
  })
})

@@ -373,22 +373,29 @@
 %0A%0A  var 
-resres
+monitorHashID
 %0A  var B
@@ -618,16 +618,19 @@
 nfo!!'%7D%0A
+  %0A
   it ('H
@@ -702,17 +702,16 @@
 done) %7B%0A
-%0A
     requ
@@ -905,40 +905,8 @@
 or)%0A
-        should.not.exist(error)%0A
     
@@ -972,22 +972,29 @@
         
-resres
+monitorHashID
  = body.
@@ -1141,14 +1141,21 @@
 ' + 
-resres
+monitorHashID
  + '
@@ -1437,32 +1437,32 @@
 %0A        done()%0A
-
       %7D%0A    %7D)%0A 
@@ -1464,12 +1464,355 @@
  %7D)%0A  %7D)
+%0A%0A  it('Delete test inserted log', function(done) %7B%0A    request.del(url + '/1/monitor/' + monitorHashID + '?accountHashID=mohammad', function (error, response, body) %7B%0A      if (error)%0A      console.log(error)%0A      body = JSON.parse(body)%0A      if (body.result)%0A        done()%0A      else%0A        done(new Error('Result is Null!'))%0A    %7D)%0A  %7D)
 %0A%7D)%0A

Add Delete Request to Monitor Model Test after Insert and Get