Skip to content

Commit 8261f2e

Browse files
chore: remove unnecessary tests
1 parent d180ca1 commit 8261f2e

File tree

1 file changed

+0
-97
lines changed

1 file changed

+0
-97
lines changed

framework/core/tests/integration/api/users/CreateTest.php

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -139,103 +139,6 @@ public function admins_can_create_activated_users()
139139
$this->assertEquals(1, $user->is_email_confirmed);
140140
}
141141

142-
/**
143-
* @test
144-
*/
145-
public function admin_can_create_user_with_longest_possible_local_part_email()
146-
{
147-
$email = str_repeat('a', 64).'@machine.local';
148-
149-
$response = $this->send(
150-
$this->request(
151-
'POST',
152-
'/api/users',
153-
[
154-
'authenticatedAs' => 1,
155-
'json' => [
156-
'data' => [
157-
'attributes' => [
158-
'username' => 'test',
159-
'password' => 'too-obscure',
160-
'email' => $email,
161-
],
162-
]
163-
],
164-
]
165-
)
166-
);
167-
168-
$this->assertEquals(201, $response->getStatusCode());
169-
170-
/** @var User $user */
171-
$user = User::where('username', 'test')->firstOrFail();
172-
173-
$this->assertEquals($email, $user->email);
174-
}
175-
176-
/**
177-
* @test
178-
*/
179-
public function admin_cannot_create_user_with_invalid_local_part_email()
180-
{
181-
$email = str_repeat('a', 65).'@machine.local';
182-
183-
$response = $this->send(
184-
$this->request(
185-
'POST',
186-
'/api/users',
187-
[
188-
'authenticatedAs' => 1,
189-
'json' => [
190-
'data' => [
191-
'attributes' => [
192-
'username' => 'test',
193-
'password' => 'too-obscure',
194-
'email' => $email,
195-
],
196-
]
197-
],
198-
]
199-
)
200-
);
201-
202-
$this->assertEquals(422, $response->getStatusCode());
203-
}
204-
205-
/**
206-
* @test
207-
*/
208-
public function admin_can_create_user_with_longest_valid_domain()
209-
{
210-
$email = 't@'.str_repeat('a', 63).'.'.str_repeat('b', 63).'.'.str_repeat('c', 63).'.'.str_repeat('d', 58).'.x';
211-
212-
$response = $this->send(
213-
$this->request(
214-
'POST',
215-
'/api/users',
216-
[
217-
'authenticatedAs' => 1,
218-
'json' => [
219-
'data' => [
220-
'attributes' => [
221-
'username' => 'test',
222-
'password' => 'too-obscure',
223-
'email' => $email,
224-
],
225-
]
226-
],
227-
]
228-
)
229-
);
230-
231-
$this->assertEquals(201, $response->getStatusCode());
232-
233-
/** @var User $user */
234-
$user = User::where('username', 'test')->firstOrFail();
235-
236-
$this->assertEquals($email, $user->email);
237-
}
238-
239142
/**
240143
* @test
241144
*/

0 commit comments

Comments
 (0)