Dancer-Plugin-EmailSender

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

---
abstract: 'Easily use Email::Sender from Dancer'
author:
  - 'Michael Alan Dorman <mdorman@ironicdesign.com>'
build_requires:
  Email::Sender::Transport::Test: 0
  Email::Simple: 0
  IO::File: 0
  Sub::Exporter: 0
  Test::Compile: 0
  Test::Fatal: 0
configure_requires:
  ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300020, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: 1.4
name: Dancer-Plugin-EmailSender
requires:

Makefile.PL  view on Meta::CPAN


my %WriteMakefileArgs = (
  "ABSTRACT" => "Easily use Email::Sender from Dancer",
  "AUTHOR" => "Michael Alan Dorman <mdorman\@ironicdesign.com>",
  "BUILD_REQUIRES" => {
    "Email::Sender::Transport::Test" => 0,
    "Email::Simple" => 0,
    "IO::File" => 0,
    "Sub::Exporter" => 0,
    "Test::Compile" => 0,
    "Test::Fatal" => 0
  },
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => "6.30"
  },
  "DISTNAME" => "Dancer-Plugin-EmailSender",
  "EXE_FILES" => [],
  "LICENSE" => "perl",
  "NAME" => "Dancer::Plugin::EmailSender",
  "PREREQ_PM" => {
    "Carp" => 0,

t/simple.t  view on Meta::CPAN

#!/usr/bin/perl

use strict;
use warnings;
use Dancer qw{:tests};
use Dancer::Plugin::EmailSender;
use Email::Simple;
use Email::Sender::Transport::Test;
use IO::File;
use Test::Fatal;
use Test::More import => ['!pass'];
use t::Util qw{body_is envelope_is header_is with_sent};

my $transport = Email::Sender::Transport::Test->new;

setting plugins => {EmailSender => {headers => {'X-Foo' => 'Bar'},
                                    transport => $transport}};

like (exception {sendemail}, qr/^You must pass me information on what to send/, 'Test for failure with no arguments');
like (exception {sendemail ''}, qr/^You must pass me a hashref to describe the email/, 'Test for failure with wrong type of arguments');



( run in 0.984 second using v1.01-cache-2.11-cpan-54e63673c56 )