| Lines 65-72
          subtest 'list() tests' => sub {
      
      
        Link Here | 
        
          | 65 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 65 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 
        
          | 66 |       ->json_is( [] ); | 66 |       ->json_is( [] ); | 
        
          | 67 |  | 67 |  | 
          
            
              | 68 |     my $agreement = | 68 |     my $vendor_1 = $builder->build_object({ class => 'Koha::Acquisition::Booksellers' }); | 
            
              | 69 |       $builder->build_object( { class => 'Koha::ERM::Agreements' } ); | 69 |     my $agreement = $builder->build_object( | 
            
              |  |  | 70 |         { | 
            
              | 71 |             class => 'Koha::ERM::Agreements', | 
            
              | 72 |             value => { vendor_id => $vendor_1->id }, | 
            
              | 73 |         } | 
            
              | 74 |     ); | 
        
          | 70 |  | 75 |  | 
        
          | 71 |     # One agreement created, should get returned | 76 |     # One agreement created, should get returned | 
        
          | 72 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 77 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 
  
    | Lines 75-85
          subtest 'list() tests' => sub {
      
      
        Link Here | 
        
          | 75 |     my $another_agreement = $builder->build_object( | 80 |     my $another_agreement = $builder->build_object( | 
        
          | 76 |         { | 81 |         { | 
        
          | 77 |             class => 'Koha::ERM::Agreements', | 82 |             class => 'Koha::ERM::Agreements', | 
          
            
              | 78 |             value => { vendor_id => $agreement->vendor_id } | 83 |             value => { vendor_id => $vendor_1->id } | 
            
              |  |  | 84 |         } | 
            
              | 85 |     ); | 
            
              | 86 |  | 
            
              | 87 |     my $vendor_2 = $builder->build_object({ class => 'Koha::Acquisition::Booksellers' }); | 
            
              | 88 |     my $agreement_with_another_vendor_id = $builder->build_object( | 
            
              | 89 |         { | 
            
              | 90 |             class => 'Koha::ERM::Agreements', | 
            
              | 91 |             value => { vendor_id => $vendor_2->id }, | 
        
          | 79 |         } | 92 |         } | 
        
          | 80 |     ); | 93 |     ); | 
            
              | 81 |     my $agreement_with_another_vendor_id = |  |  | 
            
              | 82 |       $builder->build_object( { class => 'Koha::ERM::Agreements' } ); | 
        
          | 83 |  | 94 |  | 
        
          | 84 |     # Two agreements created, they should both be returned | 95 |     # Two agreements created, they should both be returned | 
        
          | 85 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 96 |     $t->get_ok("//$userid:$password@/api/v1/erm/agreements")->status_is(200) | 
  
    | Lines 93-99
          subtest 'list() tests' => sub {
      
      
        Link Here | 
        
          | 93 |  | 104 |  | 
        
          | 94 |     # Filtering works, two agreements sharing vendor_id | 105 |     # Filtering works, two agreements sharing vendor_id | 
        
          | 95 |     $t->get_ok( "//$userid:$password@/api/v1/erm/agreements?vendor_id=" | 106 |     $t->get_ok( "//$userid:$password@/api/v1/erm/agreements?vendor_id=" | 
          
            
              | 96 |           . $agreement->vendor_id )->status_is(200) | 107 |           . $vendor_1->id )->status_is(200) | 
        
          | 97 |       ->json_is( [ $agreement->to_api, $another_agreement->to_api ] ); | 108 |       ->json_is( [ $agreement->to_api, $another_agreement->to_api ] ); | 
        
          | 98 |  | 109 |  | 
        
          | 99 |     # Attempt to search by name like 'ko' | 110 |     # Attempt to search by name like 'ko' | 
            
              | 100 | -  |  |  |