@@ -4,16 +4,15 @@ import fs from "fs";
44import { join } from "path" ;
55import sinon from "sinon" ;
66import { runCommand } from "@oclif/test" ;
7- import { cliux , configHandler } from "@contentstack/cli-utilities" ;
7+ import { cliux } from "@contentstack/cli-utilities" ;
88import messages , { $t } from "../../../../src/messages" ;
99import * as commonUtils from "../../../../src/util/common-utils" ;
1010import * as mock from "../../mock/common.mock.json" ;
1111import manifestData from "../../../../src/config/manifest.json" ;
1212import { getDeveloperHubUrl } from "../../../../src/util/inquirer" ;
1313import config from "../../../../src/config" ;
14- import { stubAuthentication } from "../../helpers/auth-stub-helper" ;
14+ import { stubAuthentication , MOCK_CMA } from "../../helpers/auth-stub-helper" ;
1515
16- const region = configHandler . get ( "region" ) ;
1716const developerHubBaseUrl = getDeveloperHubUrl ( ) ;
1817
1918describe ( "app:get" , ( ) => {
@@ -46,7 +45,7 @@ describe("app:get", () => {
4645 return cases [ prompt . name ] ;
4746 } ) ;
4847
49- nock ( region . cma )
48+ nock ( MOCK_CMA )
5049 . get ( "/v3/organizations?limit=100&asc=name&include_count=true&skip=0" )
5150 . reply ( 200 , { organizations : mock . organizations } ) ;
5251
@@ -81,7 +80,7 @@ describe("app:get", () => {
8180 sandbox . stub ( fs , "readdirSync" ) . returns ( [ ] ) ;
8281 sandbox . stub ( cliux , "inquire" ) . resolves ( "test org 1" ) ;
8382
84- nock ( region . cma )
83+ nock ( MOCK_CMA )
8584 . get ( "/v3/organizations?limit=100&asc=name&include_count=true&skip=0" )
8685 . reply ( 200 , { organizations : mock . organizations } ) ;
8786
@@ -121,7 +120,7 @@ describe("app:get", () => {
121120 sandbox . stub ( cliux , "confirm" ) . resolves ( false ) ;
122121 sandbox . stub ( cliux , "inquire" ) . resolves ( "test org 1" ) ;
123122
124- nock ( region . cma )
123+ nock ( MOCK_CMA )
125124 . get ( "/v3/organizations?limit=100&asc=name&include_count=true&skip=0" )
126125 . reply ( 200 , { organizations : mock . organizations } ) ;
127126
@@ -160,7 +159,7 @@ describe("app:get", () => {
160159 sandbox . stub ( cliux , "confirm" ) . resolves ( true ) ;
161160 sandbox . stub ( cliux , "inquire" ) . resolves ( "test org 1" ) ;
162161
163- nock ( region . cma )
162+ nock ( MOCK_CMA )
164163 . get ( "/v3/organizations?limit=100&asc=name&include_count=true&skip=0" )
165164 . reply ( 200 , { organizations : mock . organizations } ) ;
166165
0 commit comments