Skip to content

Commit 401b60e

Browse files
committed
Removed unecessary params in stub_request
1 parent 8eb5af8 commit 401b60e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

spec/github/request_spec.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@
4242
context "with invalid characters in path" do
4343
let(:wrong_path) { 'github.api/$repos★/!usersÇ' }
4444
let(:normalized_url) { 'https://api.github.com/github.api/$repos%E2%98%85/!users%C3%87' }
45-
let(:headers) do
46-
{
47-
:headers => {
48-
'Accept' => 'application/vnd.github.v3+json,application/vnd.github.beta+json;q=0.5,application/json;q=0.1',
49-
'Accept-Charset' => 'utf-8',
50-
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
51-
'User-Agent' => 'Github API Ruby Gem 0.12.3'}
52-
}
53-
end
5445

5546
before do
5647
expect(params).to receive(:options).exactly(5).times { { raw: false } }
@@ -59,7 +50,7 @@
5950

6051
it "removes invalid characters before making a request" do
6152
[:get, :patch, :post, :put, :delete].each do |request_type|
62-
stub_request(request_type, normalized_url).with(headers).
53+
stub_request(request_type, normalized_url).
6354
to_return(:status => 200, :body => "", :headers => {})
6455

6556
github.send("#{request_type}_request".to_sym, wrong_path, params)

0 commit comments

Comments
 (0)