Sha256: 25dac22a006fa5d35b465ae0a3ab5011947e36cf2aa218bb238cbf64aedc8b78

Contents?: true

Size: 804 Bytes

Versions: 2

Compression:

Stored size: 804 Bytes

Contents

require 'rubygems'
require 'require_relative' if RUBY_VERSION < '1.9'

require_relative 'common.rb'

describe Deltacloud::Collections::Base do

  before do
    @base = Deltacloud::Collections::Base
  end

  it 'has config set correctly' do
    @base.config.must_be_kind_of Deltacloud::Server
    @base.config.root_url.must_equal Deltacloud.config[:deltacloud].root_url
  end

  it 'has root_url set correctly' do
    @base.root_url.must_equal  Deltacloud.config[:deltacloud].root_url
  end

  it 'has version set correctly' do
    @base.version.must_equal  Deltacloud.config[:deltacloud].version
  end

  it 'provides helper for routes' do
    @base.must_respond_to :route_for
    @base.route_for('/hardware_profiles').must_equal "#{Deltacloud.config[:deltacloud].root_url}/hardware_profiles"
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deltacloud-core-1.0.3 tests/deltacloud/base_collection_test.rb
deltacloud-core-1.0.2 tests/deltacloud/base_collection_test.rb