1
0
mirror of https://github.com/badges/shields.git synced 2025-07-08 18:01:59 +03:00

Fix URL pattern for [StackExchange] Questions and Reputation per PR #2418 (#2430)

* Fix URL pattern for StackExchange Questions and Reputation per #2418

Url patterns have been changed back to their older legacy format.
Tests now run properly with this URL in addition to the examples
showing up on local.

* Make changes per review comments. Also change "q" to "t" parameter to match legacy url for questions
This commit is contained in:
Monica Bui
2018-11-29 17:07:31 -07:00
committed by Paul Melnikow
parent bff4f83818
commit 3b3dd9fb1b
4 changed files with 9 additions and 9 deletions

View File

@ -6,11 +6,11 @@ const t = require('../create-service-tester')()
module.exports = t
t.create('Invalid parameters')
.get('/stackoverflow/invalidimage.json')
.get('/stackoverflow/r/invalidimage.json')
.expectJSON({ name: 'stackoverflow', value: 'invalid parameters' })
t.create('Reputation for StackOverflow user 22656')
.get('/stackoverflow/22656.json')
.get('/stackoverflow/r/22656.json')
.expectJSONTypes(
Joi.object().keys({
name: 'stackoverflow reputation',
@ -19,7 +19,7 @@ t.create('Reputation for StackOverflow user 22656')
)
t.create('Reputation for Tex user 22656')
.get('/tex/226.json')
.get('/tex/r/226.json')
.expectJSONTypes(
Joi.object().keys({
name: 'tex reputation',