Skip to content

Commit

Permalink
Item9732: unit tests to verify task - looks ok
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/KinoSearchContrib@11232 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
AndrewJones authored and AndrewJones committed Mar 25, 2011
1 parent e05fd6a commit 5832a5c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/unit/KinoSearchContrib/SearchTests.pm
Expand Up @@ -175,6 +175,36 @@ sub test_search {
$this->assert_matches("TopicWithoutAttachment", $result, "TopicWithoutAttachment not found");
}

sub test_text_search {
my $this = shift;
my $result;

my $ind = Foswiki::Contrib::KinoSearchContrib::Index->newCreateIndex();
$ind->createIndex();

$result = $this->_search($this->{test_web},
"text:Kino",
$this->{test_user_wikiname},
"startpoint");

$this->assert_matches("TopicWithoutAttachment", $result, "TopicWithoutAttachment not found");
}

sub test_web_search {
my $this = shift;
my $result;

my $ind = Foswiki::Contrib::KinoSearchContrib::Index->newCreateIndex();
$ind->createIndex();

$result = $this->_search($this->{test_web},
"web:$this->{test_web} Kino",
$this->{test_user_wikiname},
"startpoint");

$this->assert_matches("TopicWithoutAttachment", $result, "TopicWithoutAttachment not found");
}

sub test_searchAttachments {
my $this = shift;
my $search = Foswiki::Contrib::KinoSearchContrib::Search->newSearch();
Expand Down

0 comments on commit 5832a5c

Please sign in to comment.