swift_client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/swift_client/version.rb +1 -1
- data/lib/swift_client.rb +4 -0
- data/test/swift_client_test.rb +6 -0
- metadata +1 -1
data/lib/swift_client/version.rb
CHANGED
data/lib/swift_client.rb
CHANGED
data/test/swift_client_test.rb
CHANGED
@@ -20,6 +20,12 @@ class SwiftClientTest < MiniTest::Test
|
|
20
20
|
assert_equal "https://storage-url.com/path", @swift_client.storage_url
|
21
21
|
end
|
22
22
|
|
23
|
+
def test_post_account
|
24
|
+
stub_request(:post, "https://example.com/v1/AUTH_account/").with(:headers => { "Accept" => "application/json", "X-Auth-Token" => "Token", "X-Account-Meta-Test" => "Test" }).to_return(:status => 204, :body => "", :headers => { "Content-Type" => "application/json" })
|
25
|
+
|
26
|
+
assert_equal 204, @swift_client.post_account("X-Account-Meta-Test" => "Test").code
|
27
|
+
end
|
28
|
+
|
23
29
|
def test_get_containers
|
24
30
|
containers = [
|
25
31
|
{ "count" => 1, "bytes" => 1, "name" => "container-1" },
|