Bugzilla – Attachment 71446 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Shorten values for virtualshelfshares.invitekey in tests
Bug-20144-sqlmodes-Shorten-values-for-virtualshelf.patch (text/plain), 2.39 KB, created by
Julian Maurice
on 2018-02-12 11:39:50 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Shorten values for virtualshelfshares.invitekey in tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 11:39:50 UTC
Size:
2.39 KB
patch
obsolete
>From 727dd74d4f8491c753384774752e541c372c69c9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Feb 2018 11:00:31 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Shorten values for > virtualshelfshares.invitekey in tests > >It's a varchar(10) > >Fix for: >Data too long for column 'invitekey' > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Virtualshelves.t | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t >index f77e36b32c..3e42c558e9 100644 >--- a/t/db_dependent/Virtualshelves.t >+++ b/t/db_dependent/Virtualshelves.t >@@ -120,21 +120,21 @@ subtest 'Sharing' => sub { > > my $shared_shelf = eval { $shelf_to_share->share }; > is ( ref( $@ ), 'Koha::Exceptions::Virtualshelves::InvalidKeyOnSharing', 'Do not share if no key given' ); >- $shared_shelf = eval { $shelf_to_share->share('this is a valid key') }; >+ $shared_shelf = eval { $shelf_to_share->share('valid key') }; > is( ref( $shared_shelf ), 'Koha::Virtualshelfshare', 'On sharing, the method should return a valid Koha::Virtualshelfshare object' ); > >- my $another_shared_shelf = eval { $shelf_to_share->share('this is another valid key') }; # Just to have 2 shares in DB >+ my $another_shared_shelf = eval { $shelf_to_share->share('valid key2') }; # Just to have 2 shares in DB > > $number_of_shelves_shared = Koha::Virtualshelfshares->search->count; > is( $number_of_shelves_shared, 2, '2 shares should have been inserted' ); > > my $is_accepted = eval { >- $shared_shelf->accept( 'this is an invalid key', $share_with_me->{borrowernumber} ); >+ $shared_shelf->accept( 'invalid k', $share_with_me->{borrowernumber} ); > }; > is( $is_accepted, undef, 'The share should have not been accepted if the key is invalid' ); > is( ref( $@ ), 'Koha::Exceptions::Virtualshelves::InvalidInviteKey', 'accept with an invalid key should raise an exception' ); > >- $is_accepted = $shared_shelf->accept( 'this is a valid key', $share_with_me->{borrowernumber} ); >+ $is_accepted = $shared_shelf->accept( 'valid key', $share_with_me->{borrowernumber} ); > ok( defined($is_accepted), 'The share should have been accepted if the key valid' ); > > is( $shelf_to_share->is_shared, 1, 'first shelf is shared' ); >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
| 71446 |
71447
|
71448
|
71449
|
71450
|
71451
|
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564