Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
karlomikus committed Dec 3, 2024
1 parent 4917e41 commit 4b4de8a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
34 changes: 17 additions & 17 deletions tests/Feature/Http/AuthControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,21 @@ public function test_password_check_response(): void
);
}

public function test_confirm_account_verify_response(): void
{
Config::set('bar-assistant.mail_require_confirmation', true);

$user = User::factory()->create([
'email' => 'test@test.com',
'password' => Hash::make('my-test-password'),
'email_verified_at' => null,
]);

$response = $this->postJson('/api/auth/login', [
'email' => $user->email,
'password' => 'my-test-password'
]);

$response->dump();
}
// public function test_confirm_account_verify_response(): void
// {
// Config::set('bar-assistant.mail_require_confirmation', true);

// $user = User::factory()->create([
// 'email' => 'test@test.com',
// 'password' => Hash::make('my-test-password'),
// 'email_verified_at' => null,
// ]);

// $response = $this->postJson('/api/auth/login', [
// 'email' => $user->email,
// 'password' => 'my-test-password'
// ]);

// $response->dump();
// }
}
6 changes: 3 additions & 3 deletions tests/Feature/Http/CocktailControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,12 +783,12 @@ public function test_cocktail_prices(): void
$response = $this->getJson('/api/cocktails/' . $cocktail->id . '/prices');

$response->assertStatus(200);
$response->assertJsonPath('data.0.prices_per_ingredient.0.price_per_unit.price', 0.03);
$response->assertJsonPath('data.0.prices_per_ingredient.0.price_per_use.price', 0.9);
$response->assertJsonPath('data.0.prices_per_ingredient.0.price_per_unit.price', 0.02);
$response->assertJsonPath('data.0.prices_per_ingredient.0.price_per_use.price', 0.8);
$response->assertJsonPath('data.0.prices_per_ingredient.1.price_per_unit.price', 0.8);
$response->assertJsonPath('data.0.prices_per_ingredient.1.price_per_use.price', 0.8);
$response->assertJsonPath('data.0.prices_per_ingredient.2.price_per_unit.price', 0.8);
$response->assertJsonPath('data.0.prices_per_ingredient.2.price_per_use.price', 0.4);
$response->assertJsonPath('data.0.total_price.price', 2.1);
$response->assertJsonPath('data.0.total_price.price', 2);
}
}

0 comments on commit 4b4de8a

Please sign in to comment.