OSDN Git Service

t: add comment.t for comment related tests
authorhylom <hylom@users.sourceforge.jp>
Fri, 21 Oct 2016 12:24:42 +0000 (21:24 +0900)
committerhylom <hylom@users.sourceforge.jp>
Fri, 21 Oct 2016 12:24:42 +0000 (21:24 +0900)
src/newslash_web/t/comment.t [new file with mode: 0644]

diff --git a/src/newslash_web/t/comment.t b/src/newslash_web/t/comment.t
new file mode 100644 (file)
index 0000000..e8bcdd6
--- /dev/null
@@ -0,0 +1,19 @@
+# -*-Perl-*-
+# destructive comment-related  tests
+use Mojo::Base -strict;
+
+use Test::More;
+use Test::Mojo;
+
+my $t = Test::Mojo->new('Newslash::Web');
+
+SKIP: {
+    skip "mode is not 'test'", 1 if ($t->app->mode ne 'test');
+    my $comments = $t->app->model('comments');
+    my $params = {};
+    my $user = "";
+    my $cid = $comments->create($params, $user);
+    ok($cid);
+}
+
+done_testing();