Commit dfd446ef authored by Dominique Dumont's avatar Dominique Dumont

added tests for short-name fallback

parent 14613351
......@@ -24,3 +24,25 @@
-=cut
+=CUT
--- a/t/short_name.t
+++ b/t/short_name.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 7;
my $class = 'Software::LicenseUtils';
require_ok($class);
@@ -17,3 +17,10 @@
isa_ok($license,'Software::License::GPL_1',"license class");
like($license->name, qr/version 1/i, "license name");
like($license->fulltext, qr/general public/i, 'license text');
+
+# test fall back
+my $mit_lic = $class->new_from_short_name({
+ short_name => 'MIT',
+ holder => 'X. Ample'
+});
+isa_ok($mit_lic,'Software::License::MIT',"license class");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment