Skip to content

Commit

Permalink
Made tests compatible with Mojolicious 4.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
kberov committed May 26, 2013
1 parent df232d2 commit 7d591d9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for Mojolicious::Plugin::DSC

0.997 2013-05-26 15:51:41 EEST
- Made tests compatible with Mojolicious 4.0+

0.996 2013-04-09 01:22:58 EEST
- Postponed connecting to the database for the time
when the helpers are called for the first time.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WriteMakefile(
MIN_PERL_VERSION => '5.10.1',
AUTHOR => q{Красимир Беров <berov@cpan.org>},
LICENSE => 'artistic_2',
PREREQ_PM => {'Mojolicious' => '3.85', 'DBIx::Simple::Class' => '0.995'},
PREREQ_PM => {'Mojolicious' => '3.85', 'DBIx::Simple::Class' => '0.996'},
META_MERGE => {
requires => {perl => '5.010001'},
resources => {
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/DSC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use DBIx::Simple::Class;
use Mojo::Util qw(camelize);
use Carp;

our $VERSION = '0.996';
our $VERSION = '0.997';

#some known good defaults
my $COMMON_ATTRIBUTES = {
Expand Down
9 changes: 5 additions & 4 deletions t/advanced.t
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,18 @@ get '/' => sub {
my $self = shift;
my $group_row =
$self->ddbix->query('SELECT * FROM my_groups WHERE "group"=?', $group->group);
$self->render_text(
'Hello ' . $user->login_name . ' from group ' . $group->group . '!');
$self->render(
text => 'Hello ' . $user->login_name . ' from group ' . $group->group . '!');
};

post '/edit/user' => sub {
my $c = shift;
my $user = My::User->find($c->param('id'));
$user->login_password($c->param('login_password'));
$user->save;
$c->render_text(
'New password for user ' . $user->login_name . ' is ' . $user->login_password);
$c->render(text => 'New password for user '
. $user->login_name . ' is '
. $user->login_password);
};

my $t = Test::Mojo->new;
Expand Down

0 comments on commit 7d591d9

Please sign in to comment.