Bugzilla – Attachment 91220 Details for
Bug 23230
Make Koha::Plugins::Base::_version_compare OO
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23230: Unit tests
Bug-23230-Unit-tests.patch (text/plain), 2.63 KB, created by
Kyle M Hall (khall)
on 2019-07-03 11:17:16 UTC
(
hide
)
Description:
Bug 23230: Unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-07-03 11:17:16 UTC
Size:
2.63 KB
patch
obsolete
>From 25b68d97afae95cb1923ec5b4a14479866b360a8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 1 Jul 2019 11:33:41 -0300 >Subject: [PATCH] Bug 23230: Unit tests > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Plugins.t | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Plugins.t b/t/db_dependent/Plugins.t >index 920ae1150d..3db0adb627 100755 >--- a/t/db_dependent/Plugins.t >+++ b/t/db_dependent/Plugins.t >@@ -288,14 +288,23 @@ subtest 'output and output_html tests' => sub { > > subtest 'Test _version_compare' => sub { > >- plan tests => 6; >+ plan tests => 12; >+ >+ is( Koha::Plugins::Base::_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); >+ is( Koha::Plugins::Base::_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); >+ is( Koha::Plugins::Base::_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); >+ is( Koha::Plugins::Base::_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); >+ is( Koha::Plugins::Base::_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); >+ is( Koha::Plugins::Base::_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); > >- is( Koha::Plugins::Base::_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); >- is( Koha::Plugins::Base::_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); >- is( Koha::Plugins::Base::_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); >- is( Koha::Plugins::Base::_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); >- is( Koha::Plugins::Base::_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); >- is( Koha::Plugins::Base::_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); >+ # OO tests >+ my $plugin = Koha::Plugin::Test->new; >+ is( $plugin->_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); >+ is( $plugin->_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); >+ is( $plugin->_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); >+ is( $plugin->_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); >+ is( $plugin->_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); >+ is( $plugin->_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); > }; > > subtest 'bundle_path() tests' => sub { >-- >2.20.1 (Apple Git-117)
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 23230
:
91152
|
91153
|
91201
|
91202
|
91203
|
91204
| 91220 |
91221
|
91222