Sha256: 019ed07df00afb180c9c48e9d4b897a93565d9a7a20442df4f11c9d3c788af7c

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

describe PuppetForge::V3::Base do
  describe '::new_collection' do
    it 'should handle responses with no results' do
      response_data = { data: {}, errors: "Something bad happened!" }

      PuppetForge::V3::Base.new_collection(response_data).should == []
    end

    it 'should handle responses with no pagination info' do
      response_data = { data: {}, errors: "Something bad happened!" }

      collection = PuppetForge::V3::Base.new_collection(response_data)

      collection.limit.should == 10
      collection.offset.should == 0
      collection.total.should == 0
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet_forge-1.0.4 spec/unit/forge/v3/base_spec.rb
puppet_forge-1.0.3 spec/unit/forge/v3/base_spec.rb
puppet_forge-1.0.2 spec/unit/forge/v3/base_spec.rb
puppet_forge-1.0.1 spec/unit/forge/v3/base_spec.rb