Skip to content

Commit

Permalink
Item10461: add a failing unit test to remind me about a query I'm not…
Browse files Browse the repository at this point in the history
… yet supporting

git-svn-id: http://svn.foswiki.org/trunk/MongoDBPlugin@11863 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Jun 7, 2011
1 parent 2a0799b commit 30caa90
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Foswiki/Plugins/MongoDBPlugin/HoistMongoDB.pm
Expand Up @@ -861,6 +861,10 @@ use Assert;
sub hoistMongoDB {
my $op = shift;
my $node = shift;

#use Data::Dumper;
#print STDERR "OP_eq: $node => ".Dumper($node)."\n" if Foswiki::Plugins::MongoDBPlugin::HoistMongoDB::MONITOR;

ASSERT( ref($node) eq 'Foswiki::Query::Node' );
ASSERT( ref( $node->{hoisted0} ) eq '' );

Expand Down
18 changes: 18 additions & 0 deletions test/unit/HoistMongoDBsTests.pm
Expand Up @@ -1530,6 +1530,24 @@ sub test_hoist_ImplicitFormNameBUG {
}
);
}
#'%SEARCH{"TestForm[name=\'Field1\'].value=\'A Field\'"'
#TODO: this is a horridly complex way to say "Field1.value='A Field'"
#but needs to be supported for other Meta attrs too
sub test_formQuery3 {
my $this = shift;
my $s = "TestForm[name=\'Field1\'].value=\'A Field\'";

$this->do_Assert(
$s,

{
'$where' => 'foswiki_getField(this, \'FIELD.FormName.value\')'
}
);

}


#this is just to show that the above eg should be 'ok'
sub test_hoist_ExplicitFormNameCompre {
my $this = shift;
Expand Down

0 comments on commit 30caa90

Please sign in to comment.