Skip to content

Commit

Permalink
Update metadata tests for 2014
Browse files Browse the repository at this point in the history
The Nestoria average house prices API only provides data for the most
recent twelve months, so these tests need to get updated periodically.

One of these days I'll get around to automating that with DateTime or
something... but not today :-)
  • Loading branch information
kaoru committed May 30, 2014
1 parent 929c6a4 commit a4899f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions t/05-metadata.t
Expand Up @@ -51,15 +51,15 @@ my $average_price = $metadata->get_average_price('listing_type' => 'rent', 'rang
ok($average_price, "no paramters - average price - $average_price");

# try with parameters
my @parameters = apply { $_->{listing_type} = 'buy'; $_->{year} = '2012' } (
my @parameters = apply { $_->{listing_type} = 'buy'; $_->{year} = '2014' } (
## monthly
{ 'range' => 'monthly', 'month' => '8', },
{ 'range' => 'monthly', 'month' => '4', },
{ 'range' => 'monthly', 'month' => 'Feb', },
{ 'range' => 'monthly', 'month' => 'March', },

## other parmaters
{ 'range' => 'monthly', 'month' => 8, 'num_beds' => 3, },
{ 'range' => 'monthly', 'month' => 8, 'per_sqm' => 1 },
{ 'range' => 'monthly', 'month' => 4, 'num_beds' => 3, },
{ 'range' => 'monthly', 'month' => 4, 'per_sqm' => 1 },
);

foreach my $parameters (@parameters) {
Expand Down
2 changes: 1 addition & 1 deletion t/06-countries.t
Expand Up @@ -74,7 +74,7 @@ plan tests => 15;
ok(
$metadata->get_average_price(
'range' => 'monthly',
'year' => 2011,
'year' => 2013,
'month' => 9,
'listing_type' => 'buy',
),
Expand Down

0 comments on commit a4899f0

Please sign in to comment.