Sha256: 354df0e2d38b1c1fd0dfbe47c5cb750f1acf706c18ddfbbc3becc47a95e5c9f1

Contents?: true

Size: 534 Bytes

Versions: 1

Compression:

Stored size: 534 Bytes

Contents

require 'vultr'
require 'minitest/autorun'

describe Vultr::Plan do

  let(:plan) { Vultr::Plan }

  it 'needs to verify list plan url' do
    assert ENV.has_key? 'VULTR_API_KEY'
    Vultr.api_key = ENV['VULTR_API_KEY']

    assert_equal plan._list, 'https://api.vultr.com/v1/plans/list'

    r = plan.list

    assert r.has_key? :status
    assert_equal r[:status], 200

    assert r.has_key? :result
    r[:result].each do |k, v|
      assert v.has_key?('VPSPLANID')
      assert_equal k.to_i, v['VPSPLANID'].to_i
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vultr-0.2.0 test/vultr/test_vultr_plan.rb