@@ -14,19 +14,19 @@ describe('services', () => {
14
14
const configData = new ConfigData ( ) ;
15
15
configData . addProfile ( 'newProfile' , constants . FAKE_ACCOUNT_SID , 'dev' ) ;
16
16
17
- expect ( configData . profiles [ 0 ] . id ) . to . equal ( 'newProfile' ) ;
18
- expect ( configData . profiles [ 0 ] . accountSid ) . to . equal ( constants . FAKE_ACCOUNT_SID ) ;
19
- expect ( configData . profiles [ 0 ] . region ) . to . equal ( 'dev' ) ;
17
+ expect ( configData . projects [ 0 ] . id ) . to . equal ( 'newProfile' ) ;
18
+ expect ( configData . projects [ 0 ] . accountSid ) . to . equal ( constants . FAKE_ACCOUNT_SID ) ;
19
+ expect ( configData . projects [ 0 ] . region ) . to . equal ( 'dev' ) ;
20
20
} ) ;
21
21
22
22
test . it ( 'should update an existing profile' , ( ) => {
23
23
const configData = new ConfigData ( ) ;
24
24
configData . addProfile ( 'activeProfile' , constants . FAKE_ACCOUNT_SID , 'dev' ) ;
25
25
configData . addProfile ( 'activeProfile' , 'new-account-sid' ) ;
26
26
27
- expect ( configData . profiles [ 0 ] . id ) . to . equal ( 'activeProfile' ) ;
28
- expect ( configData . profiles [ 0 ] . accountSid ) . to . equal ( 'new-account-sid' ) ;
29
- expect ( configData . profiles [ 0 ] . region ) . to . be . undefined ;
27
+ expect ( configData . projects [ 0 ] . id ) . to . equal ( 'activeProfile' ) ;
28
+ expect ( configData . projects [ 0 ] . accountSid ) . to . equal ( 'new-account-sid' ) ;
29
+ expect ( configData . projects [ 0 ] . region ) . to . be . undefined ;
30
30
} ) ;
31
31
} ) ;
32
32
@@ -161,10 +161,10 @@ describe('services', () => {
161
161
id : 'DOES_NOT_EXIST' ,
162
162
accountSid : 'fake_SID' ,
163
163
} ;
164
- const originalLength = configData . profiles . length ;
164
+ const originalLength = configData . projects . length ;
165
165
configData . removeProfile ( fakeProfile ) ;
166
166
167
- expect ( configData . profiles . length ) . to . equal ( originalLength ) ;
167
+ expect ( configData . projects . length ) . to . equal ( originalLength ) ;
168
168
} ) ;
169
169
170
170
test . it ( 'removes profile' , ( ) => {
@@ -175,8 +175,8 @@ describe('services', () => {
175
175
const profile = configData . getProfileById ( 'secondProfile' ) ;
176
176
configData . removeProfile ( profile ) ;
177
177
178
- expect ( configData . profiles [ 1 ] . id ) . to . equal ( 'thirdProfile' ) ;
179
- expect ( configData . profiles [ 1 ] . accountSid ) . to . equal ( 'newest_account_SID' ) ;
178
+ expect ( configData . projects [ 1 ] . id ) . to . equal ( 'thirdProfile' ) ;
179
+ expect ( configData . projects [ 1 ] . accountSid ) . to . equal ( 'newest_account_SID' ) ;
180
180
} ) ;
181
181
182
182
test . it ( 'removes active profile' , ( ) => {
@@ -187,8 +187,8 @@ describe('services', () => {
187
187
const profile = configData . setActiveProfile ( 'firstProfile' ) ;
188
188
configData . removeProfile ( profile ) ;
189
189
190
- expect ( configData . profiles [ 1 ] . id ) . to . equal ( 'thirdProfile' ) ;
191
- expect ( configData . profiles [ 1 ] . accountSid ) . to . equal ( 'newest_account_SID' ) ;
190
+ expect ( configData . projects [ 1 ] . id ) . to . equal ( 'thirdProfile' ) ;
191
+ expect ( configData . projects [ 1 ] . accountSid ) . to . equal ( 'newest_account_SID' ) ;
192
192
expect ( configData . activeProfile ) . to . equal ( null ) ;
193
193
} ) ;
194
194
} ) ;
0 commit comments