[Bast-commits] r9535 -
DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/view-deps/t
amiri at dev.catalyst.perl.org
amiri at dev.catalyst.perl.org
Tue Jun 1 23:26:37 GMT 2010
Author: amiri
Date: 2010-06-02 00:26:37 +0100 (Wed, 02 Jun 2010)
New Revision: 9535
Modified:
DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/view-deps/t/105view_deps.t
Log:
Clean up test file.
Modified: DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/view-deps/t/105view_deps.t
===================================================================
--- DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/view-deps/t/105view_deps.t 2010-06-01 23:21:22 UTC (rev 9534)
+++ DBIx-Class/0.08/branches/_abandoned_but_possibly_useful/view-deps/t/105view_deps.t 2010-06-01 23:26:37 UTC (rev 9535)
@@ -7,12 +7,8 @@
use Test::Exception;
use lib qw(t/lib);
use ViewDeps;
-use Devel::Dwarn;
-use Data::Dumper;
-use Carp::Always;
BEGIN {
- #$ENV{DBIC_TRACE} = 1;
use_ok('DBIx::Class::ResultSource::View');
}
@@ -27,10 +23,6 @@
#################### DEPS
-#if (-e "t/var/viewdeps.db") {
-#ok(unlink("t/var/viewdeps.db"),"Deleted old DB OK");
-#}
-
my @sql_files = glob("t/sql/ViewDeps*.sql");
for (@sql_files) {
ok( unlink($_), "Deleted old SQL $_ OK" );
@@ -51,16 +43,15 @@
} @{ [ $schema->sources ] }
};
-#diag( Dwarn $deps_ref);
-
-my @sorted_sources = sort {
- keys %{ $deps_ref->{$a} || {} } <=> keys %{ $deps_ref->{$b} || {} }
+my @sorted_sources =
+ sort {
+ keys %{ $deps_ref->{$a} || {} }
+ <=>
+ keys %{ $deps_ref->{$b} || {} }
|| $a cmp $b
}
keys %$deps_ref;
-#diag( Dwarn @sorted_sources );
-
#################### DEPLOY
my $ddl_dir = "t/sql";
@@ -73,19 +64,17 @@
#################### DOES ORDERING WORK?
my $tr = $schema->{sqlt};
-#diag("My TR isa: ", ref $tr);
-#diag( Dwarn keys %{$tr->{views}});
+
my @keys = keys %{$tr->{views}};
-
my @sqlt_sources =
-sort {
- $tr->{views}->{$a}->{order} cmp $tr->{views}->{$b}->{order}
-}
- at keys;
+ sort {
+ $tr->{views}->{$a}->{order}
+ cmp
+ $tr->{views}->{$b}->{order}
+ }
+ @keys;
-#diag(Dwarn @sqlt_sources);
-
is_deeply(\@sorted_sources,\@sqlt_sources,"SQLT view order triumphantly matches our order.");
done_testing;
More information about the Bast-commits
mailing list