test/cloudfiles_client_test.rb in cloudfiles-1.5.0 vs test/cloudfiles_client_test.rb in cloudfiles-1.5.0.1

- old
+ new

@@ -32,11 +32,13 @@ end def test_query query = Query.new("foo=bar&baz=quu") query.add("chunky", "bacon") - assert_equal "chunky=bacon&baz=quu&foo=bar", query.to_s + assert_match /chunky=bacon/, query.to_s + assert_match /foo=bar/, query.to_s + assert_match /baz=quu/, query.to_s assert query.has_key? "chunky" query.delete("chunky") assert_equal false, query.has_key?("chunky") end @@ -557,14 +559,12 @@ conn.stubs(:port).returns(123) conn.stubs(:started?).returns(true) conn.stubs(:head).returns(response) SwiftClient.expects(:http_connection).returns([@parsed, conn]) - assert_nothing_raised do - headers = SwiftClient.head_object(@url, @token, 'test_container', 'test_object') - assert response.header, headers - end + headers = SwiftClient.head_object(@url, @token, 'test_container', 'test_object') + assert_equal response.header, headers end def test_head_object_fails response = stub(:code => "500", :message => "failed") conn = mock("Net::HTTP") @@ -792,6 +792,6 @@ sc.put_object('test_container', 'test_object', 'some data to put up') sc.post_object('test_container', 'test_object', {"foo" => "bar"}) sc.delete_object('test_container', 'test_object') end end -end \ No newline at end of file +end