You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/05/22 22:19:37 UTC

[20/50] [abbrv] git commit: Client: Fixed client rspec tests to work against modular version

Client: Fixed client rspec tests to work against modular version


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/543f6a83
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/543f6a83
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/543f6a83

Branch: refs/heads/master
Commit: 543f6a8394899316afbe0935f4310502ad651695
Parents: ba7bfd7
Author: Michal Fojtik <mf...@redhat.com>
Authored: Wed May 16 14:09:57 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue May 22 22:17:37 2012 +0200

----------------------------------------------------------------------
 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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/543f6a83/client/specs/buckets_spec.rb
----------------------------------------------------------------------
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)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/543f6a83/client/specs/content_spec.rb
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/543f6a83/server/views/blobs/show.xml.haml
----------------------------------------------------------------------
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