This is the preferred way we’re handling server URLs: in the query string. While we still have a mix of these, I’ve argued this way is better for these reasons: 1. It allows us to make the URLs a bit more standardized across services. 2. It makes the routes unambiguous. 3. It requires less code. While it introduces a URL-encoding requirement on the parameter, I think these tradeoffs are worth it.
15 lines
351 B
JavaScript
15 lines
351 B
JavaScript
'use strict'
|
|
|
|
const { isMetric } = require('../test-validators')
|
|
const t = (module.exports = require('../tester').createServiceTester())
|
|
|
|
t.create('Security Rating')
|
|
.get(
|
|
'/security_rating/com.luckybox:luckybox.json?server=https://sonarcloud.io'
|
|
)
|
|
.expectBadge({
|
|
label: 'security rating',
|
|
message: isMetric,
|
|
color: 'blue',
|
|
})
|