Sha256: 8051bf3c65811dc0892884e8843f4f78c297092e21c58eebfc009ea886721688

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

require "#{File.dirname(__FILE__)}/../spec_helper"

describe OVIRT::Client do

  context 'http comms' do
    before(:each) do
      @sut = OVIRT::Client::new('mockuser','mockpass','http://example.com/api')
    end
      
    it "should add Accept: headers" do
      headers = @sut.send(:http_headers)
      headers[:accept].should eql('application/xml')
    end

    it "should keep existing Accept: headers" do
      value = "application/xml; detail=disks; detail=nics; detail=hosts"
      headers = @sut.send(:http_headers, {:accept => value})
      headers[:accept].should eql(value)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbovirt-0.0.23 spec/unit/client_spec.rb
rbovirt-0.0.22 spec/unit/client_spec.rb