@@ -69,6 +69,7 @@ describe('TenantController (integration)', () => {
69
69
it ( 'should create a tenant' , async ( ) => {
70
70
const dto = new SetupTenantRequestDto ( ) ;
71
71
dto . siteName = faker . string . sample ( ) ;
72
+ dto . password = '12345678' ;
72
73
73
74
return await request ( app . getHttpServer ( ) as Server )
74
75
. post ( '/admin/tenants' )
@@ -79,6 +80,7 @@ describe('TenantController (integration)', () => {
79
80
expect ( tenants ) . toHaveLength ( 1 ) ;
80
81
const [ tenant ] = tenants ;
81
82
for ( const key in dto ) {
83
+ if ( [ 'email' , 'password' ] . includes ( key ) ) continue ;
82
84
const value = dto [ key ] as string ;
83
85
expect ( tenant [ key ] ) . toEqual ( value ) ;
84
86
}
@@ -87,12 +89,11 @@ describe('TenantController (integration)', () => {
87
89
it ( 'should return bad request since tenant is already exists' , async ( ) => {
88
90
await tenantRepo . save ( {
89
91
siteName : faker . string . sample ( ) ,
90
- isPrivate : faker . datatype . boolean ( ) ,
91
- isRestrictDomain : faker . datatype . boolean ( ) ,
92
92
allowDomains : [ ] ,
93
93
} ) ;
94
94
const dto = new SetupTenantRequestDto ( ) ;
95
95
dto . siteName = faker . string . sample ( ) ;
96
+ dto . password = '12345678' ;
96
97
97
98
return request ( app . getHttpServer ( ) as Server )
98
99
. post ( '/admin/tenants' )
@@ -111,8 +112,6 @@ describe('TenantController (integration)', () => {
111
112
beforeEach ( async ( ) => {
112
113
tenant = await tenantRepo . save ( {
113
114
siteName : faker . string . sample ( ) ,
114
- isPrivate : faker . datatype . boolean ( ) ,
115
- isRestrictDomain : faker . datatype . boolean ( ) ,
116
115
allowDomains : [ ] ,
117
116
} ) ;
118
117
const { jwt } = await signInTestUser ( dataSource , authService ) ;
@@ -122,8 +121,6 @@ describe('TenantController (integration)', () => {
122
121
const dto = new UpdateTenantRequestDto ( ) ;
123
122
124
123
dto . siteName = faker . string . sample ( ) ;
125
- dto . isPrivate = faker . datatype . boolean ( ) ;
126
- dto . isRestrictDomain = faker . datatype . boolean ( ) ;
127
124
dto . allowDomains = [ ] ;
128
125
129
126
return await request ( app . getHttpServer ( ) as Server )
@@ -136,8 +133,6 @@ describe('TenantController (integration)', () => {
136
133
where : { id : tenant . id } ,
137
134
} ) ;
138
135
expect ( updatedTenant ?. siteName ) . toEqual ( dto . siteName ) ;
139
- expect ( updatedTenant ?. isPrivate ) . toEqual ( dto . isPrivate ) ;
140
- expect ( updatedTenant ?. isRestrictDomain ) . toEqual ( dto . isRestrictDomain ) ;
141
136
expect ( updatedTenant ?. allowDomains ) . toEqual ( dto . allowDomains ) ;
142
137
} ) ;
143
138
} ) ;
@@ -147,8 +142,6 @@ describe('TenantController (integration)', () => {
147
142
const dto = new UpdateTenantRequestDto ( ) ;
148
143
149
144
dto . siteName = faker . string . sample ( ) ;
150
- dto . isPrivate = faker . datatype . boolean ( ) ;
151
- dto . isRestrictDomain = faker . datatype . boolean ( ) ;
152
145
dto . allowDomains = [ ] ;
153
146
154
147
return request ( app . getHttpServer ( ) as Server )
@@ -161,8 +154,6 @@ describe('TenantController (integration)', () => {
161
154
const dto = new UpdateTenantRequestDto ( ) ;
162
155
163
156
dto . siteName = faker . string . sample ( ) ;
164
- dto . isPrivate = faker . datatype . boolean ( ) ;
165
- dto . isRestrictDomain = faker . datatype . boolean ( ) ;
166
157
dto . allowDomains = [ ] ;
167
158
168
159
return await request ( app . getHttpServer ( ) as Server )
@@ -178,6 +169,7 @@ describe('TenantController (integration)', () => {
178
169
await tenantRepo . delete ( { } ) ;
179
170
await userRepo . delete ( { } ) ;
180
171
dto . siteName = faker . string . sample ( ) ;
172
+ dto . password = '12345678' ;
181
173
182
174
await request ( app . getHttpServer ( ) as Server )
183
175
. post ( '/admin/tenants' )
0 commit comments