Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E715B97C5 for ; Mon, 21 May 2012 10:36:28 +0000 (UTC) Received: (qmail 55579 invoked by uid 500); 21 May 2012 10:36:28 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 55441 invoked by uid 500); 21 May 2012 10:36:28 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 55147 invoked by uid 99); 21 May 2012 10:36:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 10:36:27 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2012 10:36:21 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4LAa0hv024949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 May 2012 06:36:00 -0400 Received: from dhcp-29-121.brq.redhat.com (dhcp-29-121.brq.redhat.com [10.34.29.121]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4LA6sKE020488 for ; Mon, 21 May 2012 06:07:28 -0400 From: mfojtik@redhat.com To: dev@deltacloud.apache.org Subject: [PATCH core 34/51] Client: Fixed client rspec tests to work against modular version Date: Mon, 21 May 2012 12:07:15 +0200 Message-Id: <1337594852-42550-35-git-send-email-mfojtik@redhat.com> In-Reply-To: <1337594852-42550-1-git-send-email-mfojtik@redhat.com> References: <1337594852-42550-1-git-send-email-mfojtik@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Virus-Checked: Checked by ClamAV on apache.org From: Michal Fojtik Signed-off-by: Michal fojtik --- client/specs/buckets_spec.rb | 1 + client/specs/content_spec.rb | 4 ++-- server/views/blobs/show.xml.haml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/specs/buckets_spec.rb b/client/specs/buckets_spec.rb index 81b1e58..b897e0c 100644 --- a/client/specs/buckets_spec.rb +++ b/client/specs/buckets_spec.rb @@ -96,6 +96,7 @@ describe "Blobs" do blob_list.size.should eql(bucket.size.to_i) blob_list.each do |b_id| blob = client.blob({"bucket" => bucket.name, :id => b_id}) + puts blob.inspect blob.bucket.should_not be_nil blob.bucket.should be_a(String) blob.bucket.should eql(bucket.name) diff --git a/client/specs/content_spec.rb b/client/specs/content_spec.rb index c953660..ffd222c 100644 --- a/client/specs/content_spec.rb +++ b/client/specs/content_spec.rb @@ -58,7 +58,7 @@ end describe "return HTML in different browsers" do it "wants XML using format parameter" do - client['?format=xml'].get('Accept' => 'application/xhtml+xml') do |response, request, &block| + client.get(:params => { 'format' => 'xml' }, 'Accept' => 'application/xhtml+xml') do |response, request, &block| response.code.should == 200 response.headers[:content_type].should =~ /^application\/xml/ end @@ -71,7 +71,7 @@ describe "return HTML in different browsers" do end it "wants HTML using format parameter and accept set to XML" do - client['?format=html'].get('Accept' => 'application/xml') do |response, request, &block| + client.get(:params => { 'format' => 'html'}, 'Accept' => 'application/xml') do |response, request, &block| response.code.should == 200 response.headers[:content_type].should =~ /^text\/html/ end diff --git a/server/views/blobs/show.xml.haml b/server/views/blobs/show.xml.haml index bde9e80..ba3d4de 100644 --- a/server/views/blobs/show.xml.haml +++ b/server/views/blobs/show.xml.haml @@ -1,6 +1,6 @@ !!! XML %blob{:href => bucket_url(@blob.bucket) + '/' + @blob.id, :id => @blob.id} - %bucket{ :id => @blob.bucket, :href => bucket_url(@blob.bucket)} + %bucket{ :id => @blob.bucket, :href => bucket_url(@blob.bucket), :rel => :bucket} - @blob.attributes.select{ |attr| (attr!=:id && attr!=:user_metadata) }.each do |attribute| - next if attribute == :bucket - unless attribute == :content -- 1.7.10.1