| Lines 19-24
          use Modern::Perl;
      
      
        Link Here | 
        
          | 19 |  | 19 |  | 
        
          | 20 | use Test::More tests => 5; | 20 | use Test::More tests => 5; | 
        
          | 21 | use Test::Mojo; | 21 | use Test::Mojo; | 
            
              |  |  | 22 | use Test::Warn; | 
        
          | 22 |  | 23 |  | 
        
          | 23 | use t::lib::TestBuilder; | 24 | use t::lib::TestBuilder; | 
        
          | 24 | use t::lib::Mocks; | 25 | use t::lib::Mocks; | 
  
    | Lines 189-195
          subtest 'get() tests' => sub {
      
      
        Link Here | 
        
          | 189 |  | 190 |  | 
        
          | 190 | subtest 'add() tests' => sub { | 191 | subtest 'add() tests' => sub { | 
        
          | 191 |  | 192 |  | 
          
            
              | 192 |     plan tests => 15; | 193 |     plan tests => 16; | 
        
          | 193 |  | 194 |  | 
        
          | 194 |     $schema->storage->txn_begin; | 195 |     $schema->storage->txn_begin; | 
        
          | 195 |  | 196 |  | 
  
    | Lines 264-271
          subtest 'add() tests' => sub {
      
      
        Link Here | 
        
          | 264 |  | 265 |  | 
        
          | 265 |     # Authorized attempt to create with existing id | 266 |     # Authorized attempt to create with existing id | 
        
          | 266 |     $booking->{booking_id} = $booking_id; | 267 |     $booking->{booking_id} = $booking_id; | 
          
            
              | 267 |     $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is(409) | 268 |     warnings_like { | 
            
              | 268 |         ->json_is( "/error" => "Duplicate booking_id" ); | 269 |         $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is(409) | 
            
              |  |  | 270 |             ->json_is( "/error" => "Duplicate booking_id" ); | 
            
              | 271 |     } | 
            
              | 272 |     qr/DBD::mysql::st execute failed: Duplicate entry '(.*?)' for key 'PRIMARY'/; | 
        
          | 269 |  | 273 |  | 
        
          | 270 |     # TODO: Test bookings clashes | 274 |     # TODO: Test bookings clashes | 
        
          | 271 |     # TODO: Test item auto-assignment | 275 |     # TODO: Test item auto-assignment | 
            
              | 272 | -  |  |  |