Index: main/waeup.cas/trunk/waeup/cas/tests/test_server.py
===================================================================
--- main/waeup.cas/trunk/waeup/cas/tests/test_server.py	(revision 10410)
+++ main/waeup.cas/trunk/waeup/cas/tests/test_server.py	(revision 10411)
@@ -126,4 +126,30 @@
         assert 'Set-Cookie' not in resp.headers
         return
+
+    def test_login_renew_with_cookie(self):
+        # 2.1.1: cookie will be ignored when renew is set
+        app = CASServer()
+        tgc = create_tgc_value()
+        app.db.add(tgc)
+        value = str(tgc.value)
+        req = Request.blank('https://localhost/login?renew=true')
+        req.headers['Cookie'] = 'cas-tgc=%s' % value
+        resp = app(req)
+        assert resp.status == '200 OK'
+        assert b'username' in resp.body
+        assert 'Set-Cookie' not in resp.headers
+
+    def test_login_renew_as_empty_string(self):
+        # `renew` is handled correctly, even with empty value
+        app = CASServer()
+        tgc = create_tgc_value()
+        app.db.add(tgc)
+        value = str(tgc.value)
+        req = Request.blank('https://localhost/login?renew')
+        req.headers['Cookie'] = 'cas-tgc=%s' % value
+        resp = app(req)
+        assert resp.status == '200 OK'
+        assert b'username' in resp.body
+        assert 'Set-Cookie' not in resp.headers
 
 
