mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 11:32:25 -05:00
23e3821e24
This collapses the difference between master and single-process-server-tests, to remove some larger fixtures files that were in that feature branch.
35 lines
1.1 KiB
CoffeeScript
35 lines
1.1 KiB
CoffeeScript
require '../common'
|
|
|
|
describe 'languages', ->
|
|
url = getURL('/languages')
|
|
allowHeader = 'GET'
|
|
|
|
it 'can\'t be requested with HTTP POST method', (done) ->
|
|
request.post {uri: url}, (err, res, body) ->
|
|
expect(res.statusCode).toBe(405)
|
|
expect(res.headers.allow).toBe(allowHeader)
|
|
done()
|
|
|
|
it 'can\'t be requested with HTTP PUT method', (done) ->
|
|
request.put {uri: url}, (err, res, body) ->
|
|
expect(res.statusCode).toBe(405)
|
|
expect(res.headers.allow).toBe(allowHeader)
|
|
done()
|
|
|
|
it 'can\'t be requested with HTTP PATCH method', (done) ->
|
|
request {method: 'patch', uri: url}, (err, res, body) ->
|
|
expect(res.statusCode).toBe(405)
|
|
expect(res.headers.allow).toBe(allowHeader)
|
|
done()
|
|
|
|
it 'can\'t be requested with HTTP HEAD method', (done) ->
|
|
request.head {uri: url}, (err, res, body) ->
|
|
expect(res.statusCode).toBe(405)
|
|
expect(res.headers.allow).toBe(allowHeader)
|
|
done()
|
|
|
|
it 'can\'t be requested with HTTP DELETE method', (done) ->
|
|
request.del {uri: url}, (err, res, body) ->
|
|
expect(res.statusCode).toBe(405)
|
|
expect(res.headers.allow).toBe(allowHeader)
|
|
done()
|