1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- a/spec/token_check_spec.rb 2020-06-25 16:44:11.000000000 +0200
+++ b/spec/token_check_spec.rb 2023-03-27 16:20:56.781510771 +0200
@@ -8,7 +8,7 @@
end
it 'adds client_id and client_secret to a request' do
- expect(subject.backend).to receive(:http).with(:post, "/applications/foo/token", :body => "{\"access_token\": \"baz\"}", "Authorization" => "Basic Zm9vOmJhcg==") do
+ expect(subject.backend).to receive(:http).with(:post, "/applications/foo/token", { :body => "{\"access_token\": \"baz\"}", "Authorization" => "Basic Zm9vOmJhcg==" }) do
error = GH::Error.new
error.info[:response_status] = 404
raise error
@@ -17,7 +17,7 @@
end
it 'does not swallow other status codes' do
- expect(subject.backend).to receive(:http).with(:post, "/applications/foo/token", :body => "{\"access_token\": \"baz\"}", "Authorization" => "Basic Zm9vOmJhcg==") do
+ expect(subject.backend).to receive(:http).with(:post, "/applications/foo/token", { :body => "{\"access_token\": \"baz\"}", "Authorization" => "Basic Zm9vOmJhcg==" }) do
error = GH::Error.new
error.info[:response_status] = 500
raise error
|