Skip to content
Snippets Groups Projects
Commit 6ba8a7c2 authored by Gabriel Mazetto's avatar Gabriel Mazetto
Browse files

Use MultiJson

parent 0d177847
No related branches found
No related tags found
1 merge request!2Use MultiJson
Pipeline #
Loading
Loading
@@ -83,7 +83,7 @@ module Packagecloud
assert_valid_repo_name(repo)
privacy = private ? 1 : 0
body = { "repository" => { "name" => repo, "private" => privacy.to_s } }
response = post("/api/v1/repos.json", body.to_json)
response = post("/api/v1/repos.json", MultiJson.dump(body))
parsed_json_result(response)
end
 
Loading
Loading
Loading
Loading
@@ -167,7 +167,7 @@ describe Packagecloud do
end
 
it "POST /api/v1/repos.json" do
body = { "repository" => { "name" => "my_repo", "private" => "0" } }.to_json
body = MultiJson.dump({ "repository" => { "name" => "my_repo", "private" => "0" } })
result = @client.create_repository("my_repo")
expect(result.succeeded).to be_truthy
expect($request.content_type).to include("json")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment