Skip to content

Commit

Permalink
Updated version and added a test for collections template
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmun committed Oct 25, 2019
1 parent d7aaa42 commit d178c77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.mD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Change logs
===

## 1.1.0 - 22/10/2019
## 2.0.0 - 22/10/2019

By @sonofmun

Expand Down
9 changes: 9 additions & 0 deletions tests/test_browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ def r_random(self):
len(set(sets)), 1, "Random has been cached and is not recomputed"
)

def test_collection_collection_vs_version(self):
""" Make sure that a work is correctly displayed on the collection template"""
with self.client as c:
r = c.get('/collections/urn:cts:latinLit:phi1294.phi002', follow_redirects=True)
self.assertRegex(r.get_data(as_text=True), '<a.*Browse</a>\s+<a.*Read</a>')
# Make sure the read link is not present for a collection
r = c.get('/collections/urn:cts:latinLit:phi1294', follow_redirects=True)
self.assertNotIn(r.get_data(as_text=True), '<a.*Read</a>')


class NemoTestBrowseWithCache(NemoTestBrowse):
""" Do the same tests bu with a cache object """
Expand Down

0 comments on commit d178c77

Please sign in to comment.