diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-03 19:43:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2019-05-13 11:53:24 +0100 |
commit | 0796a2b6821e75e22ec6eacd3950ef916b16303d (patch) | |
tree | b37dfe49b5cfbd1be9528bc8ed9fa5667b1be7d0 /t/app/controller/admin/update_edit.t | |
parent | c65c2bc48abce71bca97079ffdb7aa39d5b7e8ed (diff) |
Update a number of packages.
Update:
* Catalyst
* Specify Catalyst::DispatchType::Regex explicitly
* Remove Catalyst::Plugin::Unicode::Encoding
* Catalyst::Plugin::SmartURI
* Specify URI::SmartURI explicitly
* Catalyst::Plugin::Static::Simple
* CGI
* Class::Load
* DateTime
* DateTime::TimeZone
* DBD::Pg
* DBIx::Class
* DBIx::Class::EncodedColumn.
* Email::Address.
* Email::MIME
* ExtUtils::MakeMaker
* ExtUtils::ParseXS (for Params::Classify upgrade)
* File::ChangeNotify
* Image::Size
* IO::Socket::SSL
* local::lib
* Moo
* Moose (and some related others due to deprecations)
* namespace::autoclean
* Net::Server
* Net::SSLeay
* Number::Phone
* Plack
* Starman
* Template
* Test::PostgreSQL
* Test::WWW::Mechanize::Catalyst
* Text::CSV
* YAML
carton install was run on a wheezy box, the oldest that is supported, to
make sure the required minimal vesions of core modules weren't removed
from the snapshot. Cpanel::JSON::XS, Devel::GlobalDestruction::XS, and
MooseX::NonMoose were then put back in the snapshot, in case another
system needs them (e.g. system Perl on Mac looks for MooseX::NonMoose).
Diffstat (limited to 't/app/controller/admin/update_edit.t')
-rw-r--r-- | t/app/controller/admin/update_edit.t | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/app/controller/admin/update_edit.t b/t/app/controller/admin/update_edit.t index 6ddbdbdfc..cf371651b 100644 --- a/t/app/controller/admin/update_edit.t +++ b/t/app/controller/admin/update_edit.t @@ -10,7 +10,7 @@ my $user2 = $mech->create_user_ok('test2@example.com', name => 'Test User 2'); my $superuser = $mech->create_user_ok('superuser@example.com', name => 'Super User', is_superuser => 1); -my $user3 = FixMyStreet::App->model('DB::User')->create( { email => 'test3@example.com' } ); +my $user3 = FixMyStreet::DB->resultset('User')->create( { email => 'test3@example.com' } ); my $dt = DateTime->new( year => 2011, @@ -21,7 +21,7 @@ my $dt = DateTime->new( second => 23 ); -my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( +my $report = FixMyStreet::DB->resultset('Problem')->find_or_create( { postcode => 'SW1A 1AA', bodies_str => '2504', @@ -52,7 +52,7 @@ $mech->log_in_ok( $superuser->email ); my $report_id = $report->id; ok $report, "created test report - $report_id"; -my $update = FixMyStreet::App->model('DB::Comment')->create( +my $update = FixMyStreet::DB->resultset('Comment')->create( { text => 'this is an update', user => $user, @@ -63,7 +63,7 @@ my $update = FixMyStreet::App->model('DB::Comment')->create( } ); -my $log_entries = FixMyStreet::App->model('DB::AdminLog')->search( +my $log_entries = FixMyStreet::DB->resultset('AdminLog')->search( { object_type => 'update', object_id => $update->id @@ -275,7 +275,7 @@ for my $test ( } subtest 'editing update email creates new user if required' => sub { - my $user = FixMyStreet::App->model('DB::User')->find( { email => 'test4@example.com' } ); + my $user = FixMyStreet::DB->resultset('User')->find( { email => 'test4@example.com' } ); $user->delete if $user; @@ -289,7 +289,7 @@ subtest 'editing update email creates new user if required' => sub { $mech->submit_form_ok( { with_fields => $fields } ); - $user = FixMyStreet::App->model('DB::User')->find( { email => 'test4@example.com' } ); + $user = FixMyStreet::DB->resultset('User')->find( { email => 'test4@example.com' } ); is_deeply $mech->visible_form_values, $fields, 'submitted form values'; @@ -302,7 +302,7 @@ subtest 'editing update email creates new user if required' => sub { subtest 'adding email to abuse list from update page' => sub { my $email = $update->user->email; - my $abuse = FixMyStreet::App->model('DB::Abuse')->find( { email => $email } ); + my $abuse = FixMyStreet::DB->resultset('Abuse')->find( { email => $email } ); $abuse->delete if $abuse; $mech->get_ok( '/admin/update_edit/' . $update->id ); @@ -313,7 +313,7 @@ subtest 'adding email to abuse list from update page' => sub { $mech->content_contains('User added to abuse list'); $mech->content_contains('<small>User in abuse table</small>'); - $abuse = FixMyStreet::App->model('DB::Abuse')->find( { email => $email } ); + $abuse = FixMyStreet::DB->resultset('Abuse')->find( { email => $email } ); ok $abuse, 'entry created in abuse table'; $mech->get_ok( '/admin/update_edit/' . $update->id ); |