spec: improve reliability of ttl refresh checking
Change-Id: I999f1a1117069349ad82883470f88263f1c94c27 Reviewed-on: https://gerrit.instructure.com/73468 Tested-by: Jenkins Reviewed-by: Simon Williams <simon@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
9e1a4ed682
commit
d9372669e6
|
@ -148,6 +148,7 @@ describe 'login' do
|
||||||
expect(response).to redirect_to(dashboard_url(:login_success => 1))
|
expect(response).to redirect_to(dashboard_url(:login_success => 1))
|
||||||
expect(session[:cas_session]).to eq cas_ticket
|
expect(session[:cas_session]).to eq cas_ticket
|
||||||
|
|
||||||
|
Canvas.redis.expire(cas_redis_key, Pseudonym::CAS_TICKET_TTL / 2)
|
||||||
cas_ticket_ttl = Canvas.redis.ttl(cas_redis_key)
|
cas_ticket_ttl = Canvas.redis.ttl(cas_redis_key)
|
||||||
get dashboard_url(:login_success => 1)
|
get dashboard_url(:login_success => 1)
|
||||||
expect(Canvas.redis.ttl(cas_redis_key)).to be > cas_ticket_ttl
|
expect(Canvas.redis.ttl(cas_redis_key)).to be > cas_ticket_ttl
|
||||||
|
|
Loading…
Reference in New Issue