Connexions/cnx-archive — pull request #228 by karenc (2014-07-01 07:16:51+00:00)
Title: determine recencey based on data, not clock

I changed the code slightly so it'll return recency based on clock if no data is available:

```
- now_timestamp := max(end_timestamp) from document_hits;
+ now_timestamp := COALESCE(MAX(end_timestamp), NOW()) FROM document_hits;
```

That fixed the test that was broken https://travis-ci.org/Connexions/cnx-archive/builds/14392216
and I added another test.