From 68c8b94d0c9610721831d32c5db39711fbafc768 Mon Sep 17 00:00:00 2001
From: Caleb Cartwright <calebcartwright@users.noreply.github.com>
Date: Fri, 18 Oct 2019 13:33:12 -0500
Subject: [PATCH] tests: fix CodeClimate Analysis service tests (#4191)

---
 .../codeclimate/codeclimate-analysis.service.js    |  4 ++--
 .../codeclimate/codeclimate-analysis.tester.js     | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/services/codeclimate/codeclimate-analysis.service.js b/services/codeclimate/codeclimate-analysis.service.js
index 9d72feb183..f1fdb3c5f0 100644
--- a/services/codeclimate/codeclimate-analysis.service.js
+++ b/services/codeclimate/codeclimate-analysis.service.js
@@ -109,7 +109,7 @@ module.exports = class CodeclimateAnalysis extends BaseJsonService {
         namedParams: {
           format: 'maintainability',
           user: 'angular',
-          repo: 'angular.js',
+          repo: 'angular',
         },
         staticPreview: this.render({
           variant: 'maintainability',
@@ -130,7 +130,7 @@ module.exports = class CodeclimateAnalysis extends BaseJsonService {
       {
         title: 'Code Climate technical debt',
         pattern: 'tech-debt/:user/:repo',
-        namedParams: { user: 'jekyll', repo: 'jekyll' },
+        namedParams: { user: 'angular', repo: 'angular' },
         staticPreview: this.render({
           variant: 'tech-debt',
           techDebtPercentage: 3.0,
diff --git a/services/codeclimate/codeclimate-analysis.tester.js b/services/codeclimate/codeclimate-analysis.tester.js
index 1b2dc6d70a..c3f5773b51 100644
--- a/services/codeclimate/codeclimate-analysis.tester.js
+++ b/services/codeclimate/codeclimate-analysis.tester.js
@@ -5,7 +5,7 @@ const { isIntegerPercentage } = require('../test-validators')
 const t = (module.exports = require('../tester').createServiceTester())
 
 t.create('issues count')
-  .get('/issues/angular/angular.js.json')
+  .get('/issues/angular/angular.json')
   .expectBadge({
     label: 'issues',
     message: Joi.number()
@@ -14,21 +14,21 @@ t.create('issues count')
   })
 
 t.create('technical debt percentage')
-  .get('/tech-debt/angular/angular.js.json')
+  .get('/tech-debt/angular/angular.json')
   .expectBadge({
     label: 'technical debt',
     message: isIntegerPercentage,
   })
 
 t.create('maintainability percentage')
-  .get('/maintainability-percentage/angular/angular.js.json')
+  .get('/maintainability-percentage/angular/angular.json')
   .expectBadge({
     label: 'maintainability',
     message: isIntegerPercentage,
   })
 
 t.create('maintainability letter')
-  .get('/maintainability/angular/angular.js.json')
+  .get('/maintainability/angular/angular.json')
   .expectBadge({
     label: 'maintainability',
     message: Joi.equal('A', 'B', 'C', 'D', 'E', 'F'),
@@ -49,10 +49,10 @@ t.create('maintainability letter for repo without snapshots')
   })
 
 t.create('malformed response for outer user repos query')
-  .get('/maintainability/angular/angular.js.json')
+  .get('/maintainability/angular/angular.json')
   .intercept(nock =>
     nock('https://api.codeclimate.com')
-      .get('/v1/repos?github_slug=angular%2Fangular.js')
+      .get('/v1/repos?github_slug=angular%2Fangular')
       .reply(200, {
         data: [{}], // No relationships in the list of data elements.
       })
@@ -63,7 +63,7 @@ t.create('malformed response for outer user repos query')
   })
 
 t.create('malformed response for inner specific repo query')
-  .get('/maintainability/angular/angular.js.json')
+  .get('/maintainability/angular/angular.json')
   .intercept(nock =>
     nock('https://api.codeclimate.com', { allowUnmocked: true })
       .get(/\/v1\/repos\/[a-z0-9]+\/snapshots\/[a-z0-9]+/)
-- 
GitLab