Skip to content

Commit

Permalink
phpunit: add validation for MOD_BOOKING_BO_COND_ALREADYRESERVED avail…
Browse files Browse the repository at this point in the history
…ability condition
  • Loading branch information
semteacher committed Apr 27, 2024
1 parent cf7ea58 commit a7890c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/bo_availability/condition_all_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,14 @@ public function test_booking_bookit_askforconfirmation_with_price() {

// Admin confirms the users booking.
$this->setAdminUser();
// Add to the shopping_cart - set ALREADYRESERVED and verify status.
$option->user_submit_response($student1, 0, 0, 1, MOD_BOOKING_VERIFIED);
list($id, $isavailable, $description) = $boinfo->is_available($settings->id, $student1->id, true);
$this->assertEquals(MOD_BOOKING_BO_COND_ALREADYRESERVED, $id);

// Confirm user's booking.
$option->user_submit_response($student1, 0, 0, 2, MOD_BOOKING_VERIFIED);
list($id, $isavailable, $description) = $boinfo->is_available($settings->id, $student1->id, true);

$this->setUser($student1);
list($id, $isavailable, $description) = $boinfo->is_available($settings->id, $student1->id, true);
Expand Down

0 comments on commit a7890c9

Please sign in to comment.