forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest_spec.rb
More file actions
36 lines (28 loc) · 1.02 KB
/
request_spec.rb
File metadata and controls
36 lines (28 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# encoding: utf-8
require 'spec_helper'
describe Github::Request do
let(:github) { Github::API.new }
let(:path) { 'github.api/repos/users' }
let(:params) { {} }
let(:options) { {} }
it "knows how to make get request" do
github.should_receive(:request).with(:get, path, params, options)
github.get_request path, params, options
end
it "knows how to make patch request" do
github.should_receive(:request).with(:patch, path, params, options)
github.patch_request path, params, options
end
it "knows how to make post request" do
github.should_receive(:request).with(:post, path, params, options)
github.post_request path, params, options
end
it "knows how to make put request" do
github.should_receive(:request).with(:put, path, params, options)
github.put_request path, params, options
end
it "knows how to make delete request" do
github.should_receive(:request).with(:delete, path, params, options)
github.delete_request path, params, options
end
end # Github::Request