File tree
Expand file treeCollapse file tree2 files changed
+12
-1
lines changed lib/rspec_api_documentation/dsl
Expand file treeCollapse file tree2 files changed
+12
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -39,7 +39,7 @@ def do_request(extra_params = {})
|
39 | 39 | path_or_query = path
|
40 | 40 |
|
41 | 41 | if method == :get && !query_string.blank?
|
42 |
| -path_or_query = path + "?#{query_string}" |
| 42 | +path_or_query += "?#{query_string}" |
43 | 43 | else
|
44 | 44 | params_or_body = respond_to?(:raw_post) ? raw_post : params
|
45 | 45 | end
|
|
Original file line number | Diff line number | Diff line change |
---|
|
181 | 181 | end
|
182 | 182 | end
|
183 | 183 |
|
| 184 | +get "/orders/:order_id/line_items/:id" do |
| 185 | +parameter :type, "The type document you want" |
| 186 | + |
| 187 | +describe "do_request" do |
| 188 | +it "should correctly set path variables and other parameters" do |
| 189 | +client.should_receive(method).with("/orders/3/line_items/2?type=short", nil, nil) |
| 190 | +do_request(:id => 2, :order_id => 3, :type => 'short') |
| 191 | +end |
| 192 | +end |
| 193 | +end |
| 194 | + |
184 | 195 | get "/orders/:order_id" do
|
185 | 196 | let(:order) { stub(:id => 1) }
|
186 | 197 |
|
|
You can’t perform that action at this time.
0 commit comments