Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use RefreshDatabase;
- public function sampleCreateUser()
- {
- return [
- ['jhune carlo', 'trogelio'],
- []
- // [['first_name' => 'jhune carlo'], 'last_name' => 'trogelio'],
- // ['first_name' => 'jhune', 'last_name' => 'dela trogelio'],
- ];
- }
- /**
- * @todo Fix ErrorException: Illegal string offset 'first_name'
- * @dataProvider sampleCreateUser
- * @test
- */
- public function shouldBeAbleToCreateEmployee($first, $last)
- {
- $admin = \factory(User::class)->create();
- $this->actingAs($admin, 'office')->post(\route('office.employees.submit'), ['first_name' => $first,
- 'last_name' => $last, 'role_id' => '1', 'store_id' => '1']);
- $this->assertDatabaseHas('users', ['first_name' => $first,
- 'last_name' => $last, 'role_id' => '1', 'store_id' => '1']);
- }
Add Comment
Please, Sign In to add comment