Skip to content

move MetaCPAN::Web::Test to t/lib #3063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions t/assets.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/about.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_cache_headers test_psgi );

Expand Down
14 changes: 8 additions & 6 deletions t/controller/account.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
use strict;
use warnings;
use MetaCPAN::Web::Test qw( app GET override_api_response POST test_psgi tx );
use lib 't/lib';

use Test::More;
use Test::Deep qw( cmp_deeply );
use Cpanel::JSON::XS qw( decode_json );
use HTTP::Date qw( time2str );
use HTTP::Cookies ();
use Plack::Session ();
use MetaCPAN::Web::Test qw( app GET override_api_response POST test_psgi tx );
use Test::Deep qw( cmp_deeply );
use Cpanel::JSON::XS qw( decode_json );
use HTTP::Date qw( time2str );
use HTTP::Cookies ();
use Plack::Session ();

my $api_res;
my $api_req;
Expand Down
2 changes: 2 additions & 0 deletions t/controller/activity.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/author.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
1 change: 1 addition & 0 deletions t/controller/changes.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );
Expand Down
2 changes: 2 additions & 0 deletions t/controller/contributing-to.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/diff.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/favorite/leaderboard.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
1 change: 1 addition & 0 deletions t/controller/feed.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use MetaCPAN::Web ();
use MetaCPAN::Web::Controller::Feed ();
Expand Down
2 changes: 2 additions & 0 deletions t/controller/home.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_cache_headers test_psgi );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/lab/dashboard.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/permission.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/pod.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/raw.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/recent.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/release.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/robots.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_cache_headers test_psgi );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/search.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );
use Encode qw( encode is_utf8 );
Expand Down
4 changes: 3 additions & 1 deletion t/controller/search/autocomplete.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use strict;
use warnings;
use Encode qw( encode is_utf8 );
use lib 't/lib';

use Test::More;
use Encode qw( encode is_utf8 );
use MetaCPAN::Web::Test qw( app GET test_psgi );
use Cpanel::JSON::XS qw( decode_json );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/search/precision.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/search/suggestion.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/shared/release-info.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More 0.96;
use MetaCPAN::Web::Test qw( app GET test_psgi tx );

Expand Down
2 changes: 2 additions & 0 deletions t/controller/source.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_cache_headers test_psgi tx );

Expand Down
3 changes: 2 additions & 1 deletion t/encoding.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# vim: set ts=2 sts=2 sw=2 expandtab smarttab:
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( override_api_response );
use Encode qw( encode is_utf8 );
Expand Down
2 changes: 2 additions & 0 deletions t/fastly_headers.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app GET test_psgi );

Expand Down
1 change: 1 addition & 0 deletions t/html.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions t/markdown.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;

use MetaCPAN::Web::RenderUtil qw( render_markdown );
Expand Down
1 change: 1 addition & 0 deletions t/model/api/lab.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web ();
Expand Down
2 changes: 2 additions & 0 deletions t/model/changes-tests/read_dbix-class.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use aliased 'MetaCPAN::Web::Model::API::Changes::Parser';

Expand Down
2 changes: 2 additions & 0 deletions t/model/changes-tests/read_moose.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use aliased 'MetaCPAN::Web::Model::API::Changes::Parser';

Expand Down
1 change: 1 addition & 0 deletions t/model/changes.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;

Expand Down
1 change: 1 addition & 0 deletions t/model/permission.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web ();
Expand Down
1 change: 1 addition & 0 deletions t/model/release-info.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use Module::Runtime qw( use_module );
Expand Down
1 change: 1 addition & 0 deletions t/model/release.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use Cpanel::JSON::XS qw( decode_json );
Expand Down
1 change: 1 addition & 0 deletions t/moose.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use File::Find (); # core
use Module::Runtime ();
Expand Down
2 changes: 2 additions & 0 deletions t/session.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use MetaCPAN::Web::Test qw( app test_psgi );
use URI::Escape ();
Expand Down
1 change: 1 addition & 0 deletions t/static-files.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use Digest::SHA ();
Expand Down
3 changes: 1 addition & 2 deletions t/tidyall.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env perl

use strict;
use warnings;
use lib 't/lib';

# This test is _really_ slow with Devel::Cover running. Also,
# there's really no reason to run this when coverage tests are running, since
Expand Down
1 change: 1 addition & 0 deletions t/view/json.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use strict;
use warnings;
use lib 't/lib';

use Test::More;
use HTTP::Request::Common qw( POST );
use MetaCPAN::Web::Test qw( app test_psgi );
Expand Down