Sha256: 73521675514fbd125170f5a0d0f8b22b0d3b680dcd781021111f352581271ce2

Contents?: true

Size: 1.11 KB

Versions: 14

Compression:

Stored size: 1.11 KB

Contents

#
# Author:: Matheus Francisco Barra Mina (<mfbmina@gmail.com>)
# © Copyright IBM Corporation 2015.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#

Shindo.tests("Fog::Network[:softlayer] | Datacenter model", ["softlayer"]) do
  pending unless Fog.mocking?

  tests("success") do
    @dc = Fog::Network[:softlayer].datacenters.first

    tests("#get_avaliable_maintenance_windows(begin_date, end_date, slots_number)") do
      data_matches_schema(Array) { @dc.get_avaliable_maintenance_windows("2015-06-01", "2015-06-02", 1) }
    end
  end

  tests ("failure") do
    tests("#get_avaliable_maintenance_windows(nil, end_date, slots_number)") do
      raises(ArgumentError) { @dc.get_avaliable_maintenance_windows(nil, "2015-06-02", 1) }
    end

    tests("#get_maintenance_windows(location_id, begin_date, nil, slots_number)") do
      raises(ArgumentError) { @dc.get_avaliable_maintenance_windows("2015-06-01", nil, 1) }
    end

    tests("#get_maintenance_windows(location_id, begin_date, end_date)") do
      raises(ArgumentError) { @dc.get_avaliable_maintenance_windows("2015-06-01", "2015-06-02") }
    end
  end
end

Version data entries

14 entries across 12 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/tests/softlayer/models/network/datacenter_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/tests/softlayer/models/network/datacenter_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.1.4 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.1.3 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.1.2 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.1.1 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.1.0 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.0.3 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.0.2 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.0.1 tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-1.0.0 tests/softlayer/models/network/datacenter_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/tests/softlayer/models/network/datacenter_tests.rb
fog-softlayer-0.4.7 tests/softlayer/models/network/datacenter_tests.rb