Sha256: 7d2eef123a804828c728477b47dbd9345897a72b4c422056510423f3a2933c02

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

require './lib/nhr-api-ruby-client'

RSpec.configure do |config|
  # Use color in STDOUT
  config.color = true

  # other config options here...    

end

describe Nhr::Client do
  before(:all) do #itri-tomato.project@insnergy.com
    @nhr_url = 'http://59.124.104.45/api/getinformation.php'
    @token = '762a2cd972e278df40f9425ecfdaf486e6efedf8c1be02e3a227ce'
    @action = 'GetPlugPowerConsumption'
    @cmdvalue = '1'
    @device_ieee = '00124B000426162F'
    @gateway_id = '319'
    @stime = Time.new('2016','12','01').to_s
    @etime = Time.new('2017','01','01').to_s
    #@nhr = Nhr::Client.new(nhr_url: nhr_url, token: token, action: action, device_ieee: device_ieee, cmdvalue: cmdvalue)
  end

  it 'should get response' do
    p Nhr::Client.new(nhr_url: @nhr_url, token: @token, action: @action, gateway_id: @gateway_id, device_ieee: @device_ieee, cmdvalue: @cmdvalue, stime: @stime, etime: @etime).response
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nhr-api-ruby-client-0.5.0 spec/nhr-api-ruby-client_spec.rb