meta {
  name: Get summary (default tz)
  type: http
  seq: 5
}

get {
  url: {{BASE_URL}}/api/summary?from=2021-05-28&to=2021-05-28
  body: none
  auth: bearer
}

params:query {
  from: 2021-05-28
  to: 2021-05-28
}

auth:bearer {
  token: {{WRITEUSER_TOKEN}}
}

assert {
  res.status: eq 200
}

tests {
  const moment = require('moment')
  
  test("Correct time zone", function () {
      const targetDateTz = moment(`2021-05-28T00:00:00${bru.getCollectionVar('TZ_OFFSET')}`)
      expect(moment(res.body.from).isSame(targetDateTz)).to.eql(true)
      expect(moment(res.body.to).isSame(targetDateTz)).to.eql(true)
  });
  
}
