[libmagpie-perl] 07/30: Adding previously missed test classes for the new DBIC Resource.

Jonas Smedegaard dr at jones.dk
Wed Dec 6 00:56:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/1.163200-1
in repository libmagpie-perl.

commit 252b83f3ad3691eb3e4796ec08508f0f075bbf3c
Author: Kip Hampton <khampton at totalcinema.com>
Date:   Mon Nov 14 17:20:46 2016 -0800

    Adding previously missed test classes for the new DBIC Resource.
---
 t/lib/Magpie/DBIC/Schema.pm             |  6 ++++++
 t/lib/Magpie/DBIC/Schema/Result/User.pm | 35 +++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/t/lib/Magpie/DBIC/Schema.pm b/t/lib/Magpie/DBIC/Schema.pm
new file mode 100644
index 0000000..103fb81
--- /dev/null
+++ b/t/lib/Magpie/DBIC/Schema.pm
@@ -0,0 +1,6 @@
+package Magpie::DBIC::Schema;
+use base qw/DBIx::Class::Schema/;
+
+__PACKAGE__->load_namespaces();
+
+1;
\ No newline at end of file
diff --git a/t/lib/Magpie/DBIC/Schema/Result/User.pm b/t/lib/Magpie/DBIC/Schema/Result/User.pm
new file mode 100644
index 0000000..a7921e9
--- /dev/null
+++ b/t/lib/Magpie/DBIC/Schema/Result/User.pm
@@ -0,0 +1,35 @@
+package Magpie::DBIC::Schema::Result::User;
+use Moose;
+use Moose::Util::TypeConstraints;
+use MooseX::NonMoose;
+use MooseX::MarkAsMethods autoclean => 1;
+extends 'DBIx::Class::Core';
+
+__PACKAGE__->table('users');
+
+__PACKAGE__->add_columns(
+    id => {
+        data_type => 'int',
+        is_auto_increment => 1,
+    },
+    name => {
+        data_type => 'varchar',
+        size => 50,
+    },
+    status => {
+        data_type => 'varchar',
+        size => 50,
+    },
+);
+
+__PACKAGE__->set_primary_key('id');
+
+sub TO_JSON {
+    my $self = shift;
+    return {
+        name => $self->name,
+        status => $self->status,
+    };
+}
+
+1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmagpie-perl.git



More information about the Pkg-perl-cvs-commits mailing list