diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-10-19 17:25:13 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-11-16 20:21:04 +0100 |
commit | 07546d5e1f4047a1030a91d0ffaa39fb96e66a41 (patch) | |
tree | 442327150154571ec1be84a47cf4c012f0ba50bc /server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts | |
parent | 3ea9808248000c145f53a4f1cdb8711d63b97da4 (diff) | |
download | sonarqube-07546d5e1f4047a1030a91d0ffaa39fb96e66a41.tar.gz sonarqube-07546d5e1f4047a1030a91d0ffaa39fb96e66a41.zip |
SONAR-11323 Ease workflow to bind personal organizations
* Create withUserOrganizations and use it in create Orgs/Projects page
* Update ALM object format in api/navigation/component and api/organizations/search
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts index 02353fe12e2..7a54b6b68bd 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts +++ b/server/sonar-web/src/main/js/helpers/__tests__/almIntegrations-test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { isBitbucket, isGithub, isVSTS, sanitizeAlmId } from '../almIntegrations'; +import { isBitbucket, isGithub, isPersonal, isVSTS, sanitizeAlmId } from '../almIntegrations'; it('#isBitbucket', () => { expect(isBitbucket('bitbucket')).toBeTruthy(); @@ -35,6 +35,11 @@ it('#isVSTS', () => { expect(isVSTS('github')).toBeFalsy(); }); +it('#isPersonal', () => { + expect(isPersonal({ key: 'foo', name: 'Foo', type: 'USER' })).toBeTruthy(); + expect(isPersonal({ key: 'foo', name: 'Foo', type: 'ORGANIZATION' })).toBeFalsy(); +}); + it('#sanitizeAlmId', () => { expect(sanitizeAlmId('bitbucketcloud')).toBe('bitbucket'); expect(sanitizeAlmId('bitbucket')).toBe('bitbucket'); |