|
|
|
@ -105,7 +105,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -115,7 +115,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -127,7 +127,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
@ -167,7 +167,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -178,7 +178,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -191,7 +191,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
@ -328,7 +328,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -338,7 +338,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -350,7 +350,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
@ -390,7 +390,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -401,7 +401,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -414,7 +414,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
@ -503,7 +503,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -513,7 +513,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -525,7 +525,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
{ |
|
|
|
\$this->loginAsUser(); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->post(route('{$this->table_name}.store'), \$this->getCreateFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
@ -565,7 +565,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name empty
|
|
|
|
// name empty
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields(['name' => ''])); |
|
|
|
\$this->assertSessionHasErrors('name'); |
|
|
|
} |
|
|
|
@ -576,7 +576,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Name 70 characters
|
|
|
|
// name 70 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'name' => str_repeat('Test Title', 7), |
|
|
|
])); |
|
|
|
@ -589,7 +589,7 @@ class Manage{$this->model_name}Test extends TestCase |
|
|
|
\$this->loginAsUser(); |
|
|
|
\${$this->lang_name} = factory({$this->model_name}::class)->create(['name' => 'Testing 123']); |
|
|
|
|
|
|
|
// Description 256 characters
|
|
|
|
// description 256 characters
|
|
|
|
\$this->patch(route('{$this->table_name}.update', \${$this->lang_name}), \$this->getEditFields([ |
|
|
|
'description' => str_repeat('Long description', 16), |
|
|
|
])); |
|
|
|
|