Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function testIndex()
- {
- Auth::login(User::where('email', 'superadmin@email.com')->first());
- $response = $this->get(route('daily_bonuses.index'));
- $response->assertStatus(200);
- }
- public function testUpdate()
- {
- Auth::login(User::where('email', 'superadmin@email.com')->first());
- $faker = Faker::create();
- $response = $this->put(route('daily_bonuses.update', DailyBonus::all()->random()), [
- 'points' => doubleval($faker->randomDigit),
- ]);
- $response->assertStatus(200);
- }
- public function testStore()
- {
- Auth::login(User::where('email', 'superadmin@email.com')->first());
- $faker = Faker::create();
- $type = DailyBonus::$types[0];
- if (is_null(DailyBonus::where('type', $type)->first())) {
- $response = $this->post(route('daily_bonuses.store'), [
- 'currency_id' => Currency::where('app_currency', true)->random()->currency_id,
- 'type' => DailyBonus::$types[0],
- 'points' => doubleval($faker->randomDigit),
- ]);
- $response->assertStatus(200);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement