From c63529e2e5ea853d2ae47f8567d660b8b848cdf2 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 17 Apr 2018 19:07:47 +0200 Subject: [PATCH] Bug 20402: Use TestBuilder->build_object in oauth.t Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/api/v1/oauth.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/api/v1/oauth.t b/t/db_dependent/api/v1/oauth.t index 693bccb3e7..eb95195b24 100755 --- a/t/db_dependent/api/v1/oauth.t +++ b/t/db_dependent/api/v1/oauth.t @@ -35,14 +35,13 @@ subtest '/oauth/token tests' => sub { $schema->storage->txn_begin; - my $borrower = $builder->build({ - source => 'Borrower', + my $patron = $builder->build_object({ + class => 'Koha::Patrons', value => { surname => 'Test OAuth', flags => 0, }, }); - my $patron = Koha::Patrons->find($borrower->{borrowernumber}); # Missing parameter grant_type $t->post_ok('/api/v1/oauth/token') -- 2.17.0