[Bps-public-commit] r19805 - in Net-Google-Code/trunk/t: sample

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu May 28 23:17:35 EDT 2009


Author: sunnavy
Date: Thu May 28 23:17:35 2009
New Revision: 19805

Added:
   Net-Google-Code/trunk/t/30.role_predefined.t
   Net-Google-Code/trunk/t/sample/30.role_predefined.js

Log:
tests for predefined role

Added: Net-Google-Code/trunk/t/30.role_predefined.t
==============================================================================
--- (empty file)
+++ Net-Google-Code/trunk/t/30.role_predefined.t	Thu May 28 23:17:35 2009
@@ -0,0 +1,47 @@
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+use Test::MockModule;
+
+use FindBin qw/$Bin/;
+use File::Slurp;
+
+my $content = read_file("$Bin/sample/30.role_predefined.js");
+
+my $mock = Test::MockModule->new('Net::Google::Code::Issue');
+$mock->mock( 'fetch', sub { $content } );
+
+use Net::Google::Code::Issue;
+my $issue = Net::Google::Code::Issue->new( project => 'test' );
+ok( $issue->load_predefined, 'loaded predefined' );
+
+is_deeply(
+    $issue->predefined_labels,
+    [
+        'Type-Defect',           'Type-Enhancement',
+        'Type-Task',             'Type-Review',
+        'Type-Other',            'Priority-Critical',
+        'Priority-High',         'Priority-Medium',
+        'Priority-Low',          'OpSys-All',
+        'OpSys-Windows',         'OpSys-Linux',
+        'OpSys-OSX',             'Milestone-Release1.0',
+        'Component-UI',          'Component-Logic',
+        'Component-Persistence', 'Component-Scripts',
+        'Component-Docs',        'Security',
+        'Performance',           'Usability',
+        'Maintainability',
+    ],
+    'predefined labels'
+);
+
+is_deeply(
+    $issue->predefined_status,
+    {
+        'closed' =>
+          [ 'Fixed', 'Verified', 'Invalid', 'Duplicate', 'WontFix', 'Done', ],
+        'open' => [ 'New', 'Accepted', 'Started', ],
+
+    },
+    'predefined status'
+);

Added: Net-Google-Code/trunk/t/sample/30.role_predefined.js
==============================================================================
--- (empty file)
+++ Net-Google-Code/trunk/t/sample/30.role_predefined.js	Thu May 28 23:17:35 2009
@@ -0,0 +1,132 @@
+{ 'open': [
+ 
+ { name:"New",
+ doc:"Issue has not had initial review yet" },
+ 
+ { name:"Accepted",
+ doc:"Problem reproduced / Need acknowledged" },
+ 
+ { name:"Started",
+ doc:"Work on this issue has begun" }
+ 
+ ],
+ 'closed': [
+ 
+ { name:"Fixed",
+ doc:"Developer made source code changes, QA should verify" },
+ 
+ { name:"Verified",
+ doc:"QA has verified that the fix worked" },
+ 
+ { name:"Invalid",
+ doc:"This was not a valid issue report" },
+ 
+ { name:"Duplicate",
+ doc:"This report duplicates an existing issue" },
+ 
+ { name:"WontFix",
+ doc:"We decided to not take action on this issue" },
+ 
+ { name:"Done",
+ doc:"The requested non-coding task was completed" }
+ 
+ ],
+ 'statuses_offer_merge': [
+ "Duplicate"
+ ],
+ 'labels': [
+ 
+ { name:"Type-Defect",
+ doc:"Report of a software defect" },
+ 
+ { name:"Type-Enhancement",
+ doc:"Request for enhancement" },
+ 
+ { name:"Type-Task",
+ doc:"Work item that doesn't change the code or docs" },
+ 
+ { name:"Type-Review",
+ doc:"Request for a source code review" },
+ 
+ { name:"Type-Other",
+ doc:"Some other kind of issue" },
+ 
+ { name:"Priority-Critical",
+ doc:"Must resolve in the specified milestone" },
+ 
+ { name:"Priority-High",
+ doc:"Strongly want to resolve in the specified milestone" },
+ 
+ { name:"Priority-Medium",
+ doc:"Normal priority" },
+ 
+ { name:"Priority-Low",
+ doc:"Might slip to later milestone" },
+ 
+ { name:"OpSys-All",
+ doc:"Affects all operating systems" },
+ 
+ { name:"OpSys-Windows",
+ doc:"Affects Windows users" },
+ 
+ { name:"OpSys-Linux",
+ doc:"Affects Linux users" },
+ 
+ { name:"OpSys-OSX",
+ doc:"Affects Mac OS X users" },
+ 
+ { name:"Milestone-Release1.0",
+ doc:"All essential functionality working" },
+ 
+ { name:"Component-UI",
+ doc:"Issue relates to program UI" },
+ 
+ { name:"Component-Logic",
+ doc:"Issue relates to application logic" },
+ 
+ { name:"Component-Persistence",
+ doc:"Issue relates to data storage components" },
+ 
+ { name:"Component-Scripts",
+ doc:"Utility and installation scripts" },
+ 
+ { name:"Component-Docs",
+ doc:"Issue relates to end-user documentation" },
+ 
+ { name:"Security",
+ doc:"Security risk to users" },
+ 
+ { name:"Performance",
+ doc:"Performance issue" },
+ 
+ { name:"Usability",
+ doc:"Affects program usability" },
+ 
+ { name:"Maintainability",
+ doc:"Hinders future changes" }
+ 
+ ],
+ 'excl_prefixes': [
+ 
+ "type",
+ 
+ "priority",
+ 
+ "milestone"
+ 
+ ],
+ 'members': [
+ 
+ { name:"sunnavy",
+ doc:"" }
+ ,
+ 
+ { name:"jessev",
+ doc:"" },
+ 
+ { name:"fayland",
+ doc:"" }
+ 
+ ],
+ 'strict': 0
+}



More information about the Bps-public-commit mailing list