##// END OF EJS Templates
added tests for gist expiration
marcink -
r3844:ec64c396 beta
parent child Browse files
Show More
@@ -1,3 +1,5 b''
1 import datetime
2
1 from rhodecode.tests import *
3 from rhodecode.tests import *
2 from rhodecode.model.gist import GistModel
4 from rhodecode.model.gist import GistModel
3 from rhodecode.model.meta import Session
5 from rhodecode.model.meta import Session
@@ -73,6 +75,15 b' class TestGistsController(TestController'
73 response.mustcontain('gist test')
75 response.mustcontain('gist test')
74 response.mustcontain('<div class="ui-btn green badge">Public gist</div>')
76 response.mustcontain('<div class="ui-btn green badge">Public gist</div>')
75
77
78 def test_access_expired_gist(self):
79 self.log_user()
80 gist = _create_gist('never-see-me')
81 gist.gist_expires = 0 # 1970
82 Session().add(gist)
83 Session().commit()
84
85 response = self.app.get(url('gist', id=gist.gist_access_id), status=404)
86
76 def test_create_private(self):
87 def test_create_private(self):
77 self.log_user()
88 self.log_user()
78 response = self.app.post(url('gists'),
89 response = self.app.post(url('gists'),
General Comments 0
You need to be logged in to leave comments. Login now