mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
fix marking factory to make marking capital letter
This commit is contained in:
@@ -5,6 +5,6 @@ use Faker\Generator as Faker;
|
||||
$factory->define(App\Marking::class, function (Faker $faker) {
|
||||
return [
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'marking' => str_random(10)
|
||||
'marking' => strtoupper(str_random(5))
|
||||
];
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ class RegisterTest extends TestCase
|
||||
public function setUp(){
|
||||
parent::setUp();
|
||||
Artisan::call('db:seed');
|
||||
|
||||
$this->marking = factory(Marking::class)->create();
|
||||
}
|
||||
|
||||
@@ -21,13 +20,12 @@ class RegisterTest extends TestCase
|
||||
/** @test */
|
||||
public function can_register()
|
||||
{
|
||||
$this->postJson('/api/register', [
|
||||
$response = $this->postJson('/api/register', [
|
||||
'email' => $this->marking->email,
|
||||
'password' => 'secret',
|
||||
'password_confirmation' => 'secret',
|
||||
'marking' => $this->marking->marking
|
||||
])
|
||||
->assertSuccessful()
|
||||
->assertJsonStructure(['id','email']);
|
||||
->assertSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user