Skip to content

Commit 5fa1423

Browse files
committed
1 parent d2bd88f commit 5fa1423

File tree

4 files changed

+62
-16
lines changed

4 files changed

+62
-16
lines changed

Cakefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,5 @@ task 'dev', "Open source files, run spec in browser, and watch for changes", ->
5151
exec "open http-spec.html"
5252
exec "open operation-spec.html"
5353
exec "open request-spec.html"
54-
exec "open setup-spec.html"
5554
coffee = spawn 'coffee', ['-cw', '-o', 'lib', 'src']
5655
coffee.stdout.on 'data', (data) -> console.log data.toString().trim()

lib/swagger-http-spec.js

Lines changed: 34 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/swagger-http-spec.coffee

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,32 @@ describe 'SwaggerHttp for version 1.2 spec', ->
191191
expect(obj.headers["Content-Type"]).toBe "application/json"
192192
expect(obj.url).toBe ("http://petstore.swagger.wordnik.com/api/pet/100")
193193

194+
describe "query params should be single encoded", ->
194195

196+
beforeEach ->
197+
window.body = null
198+
window.response = null
199+
window.callback = null
200+
window.error = null
201+
window.success_callback = (data) ->
202+
window.response = data
203+
window.error_callback = (data) ->
204+
window.error = data
205+
206+
it "verifies the http request object for a DELETE", ->
207+
params = {
208+
status: "a b c d e"
209+
}
210+
opts = {
211+
mock: true
212+
}
213+
214+
window.response = swagger.pet.findPetsByStatus(params, opts, success_callback, error_callback)
215+
216+
waitsFor ->
217+
window.response?
218+
219+
runs ->
220+
obj = window.response
221+
expect(obj.method).toBe "GET"
222+
expect(obj.url).toBe ("http://petstore.swagger.wordnik.com/api/pet/findByStatus?status=a%20b%20c%20d%20e")

src/swagger-setup-spec.coffee

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)