}
{
- my $tag_info = Products->collection_with_tags
+ my $tag_info = BSE::TB::Products->collection_with_tags
(
"all_visible_products",
[ "iPod: Nano" ],
is($parent->section->{id}, $parent->{id}, "parent should be it's own section");
is($kids[0]->section->{id}, $parent->{id}, "kids section should be the parent");
-my $top = Articles->getByPkey(1);
+my $top = BSE::TB::Articles->getByPkey(1);
ok($top, "grabbing Home page");
template_test "cfg", $top, <<TEMPLATE, <<EXPECTED;
EXPECTED
-my $cat = Articles->tag_category("Foo:");
+my $cat = BSE::TB::Articles->tag_category("Foo:");
my @old_deps = $cat->deps;
my $error;
$cat->set_deps([ "Bar:" ], \$error);
skip "$tag: couldn't make generator", 1 unless $gen;
eval {
$content =
- $gen->generate_low($template, $article, 'Articles', 0);
+ $gen->generate_low($template, $article, 'BSE::TB::Articles', 0);
};
ok(defined $content, "$tag: generate content");
diag $@ unless $content;
sub _generate_dyn_template {
my ($article, $template) = @_;
- my $articles = 'Articles';
+ my $articles = 'BSE::TB::Articles';
my $genname = $article->{generator};
eval "use $genname";
$@ && die $@;
skip "$tag: couldn't make generator", 1 unless $gen;
eval {
$content =
- $gen->generate_low($template, $article, 'Articles', 0);
+ $gen->generate_low($template, $article, 'BSE::TB::Articles', 0);
};
ok($content, "$tag: generate content");
diag $@ unless $content;
use JSON;
use DevHelp::HTML;
use Test::More;
-use Article;
+use BSE::TB::Article;
use Time::HiRes qw(time sleep);
-my @cols = Article->columns;
+my @cols = BSE::TB::Article->columns;
my $base = 130;
type => "Catalog",
}, "make test catalog");
-is($cat->{generator}, "Generate::Catalog", "make sure it's a catalog");
+is($cat->{generator}, "BSE::Generate::Catalog", "make sure it's a catalog");
# and an article
my $art = do_add($add_url,
title => "Test article",
}, "make test article");
-is($art->{generator}, "Generate::Article", "make sure it's an article");
+is($art->{generator}, "BSE::Generate::Article", "make sure it's an article");
my $prod;
{
parentid => $cat->{id},
title => "Some Product",
}, "make test product");
- is($result->{generator}, "Generate::Product",
+ is($result->{generator}, "BSE::Generate::Product",
"check generator");
$prod = $result;
}
close $fh;
my $imp = BSE::Importer->new(cfg => $cfg, profile => "simpleupdate$when", callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
like($testb->body, qr/This is the body/, "check the body is updated");
my @images = $testb->images;
is(@images, 1, "have an image");
close $fh;
my $imp = BSE::Importer->new(cfg => $cfg, profile => "completefile$when", callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
my ($file) = grep $_->name eq "test", $testb->files;
ok($file, "found the file with name 'test'")
close $fh;
my $imp = BSE::Importer->new(cfg => $cfg, profile => "updatefile$when", callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
my ($file) = grep $_->name eq "test", $testb->files;
ok($file, "found the updated file with name 'test'")
close $fh;
my $imp = BSE::Importer->new(cfg => $cfg, profile => "updatefileb$when", callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
my ($file) = grep $_->name eq "test", $testb->files;
ok($file, "found the updated file with name 'test'")
close $fh;
my $imp = BSE::Importer->new(cfg => $cfg, profile => "alias$when", callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
is($testb->linkAlias, "alias-${when}_more", "check alias set correctly");
}
my $imp = BSE::Importer->new(cfg => $cfg, profile => "simpleupdate$when",
callback => sub { note @_ });
$imp->process($filename);
- my $testb = Articles->getByPkey($testa->id);
+ my $testb = BSE::TB::Articles->getByPkey($testa->id);
like($testb->body, qr/This is the body/, "check the body is updated");
}
use_ok("BSE::TB::TagCategories");
use_ok("BSE::TB::TagOwner");
use_ok("BSE::TB::TagOwners");
-use_ok("Article");
-use_ok("Articles");
-use_ok('Generate');
-use_ok('Generate::Article');
-use_ok('Generate::Product');
-use_ok('Generate::Catalog');
+use_ok("BSE::TB::Article");
+use_ok("BSE::TB::Articles");
+use_ok('BSE::Generate');
+use_ok('BSE::Generate::Article');
+use_ok('BSE::Generate::Product');
+use_ok('BSE::Generate::Catalog');
use_ok('BSE::Edit::Article');
use_ok('BSE::Edit::Site');
use_ok('BSE::Edit::Catalog');