From 2b51c6e13f179d43218c1b34b02325cf393a66d8 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 20 Dec 2019 15:36:24 +0800 Subject: [PATCH] Fix tests --- .travis.yml | 2 +- spec/controller_helpers_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3fd9b7..6ba07c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby rvm: - - 2.2.3 + - 2.6.0 services: - memcached script: diff --git a/spec/controller_helpers_spec.rb b/spec/controller_helpers_spec.rb index 995c403..e1fb790 100644 --- a/spec/controller_helpers_spec.rb +++ b/spec/controller_helpers_spec.rb @@ -31,7 +31,8 @@ describe RuCaptcha do describe '.rucaptcha_sesion_key_key' do it 'should work' do - expect(simple.rucaptcha_sesion_key_key).to eq ['rucaptcha-session', simple.session.id].join(':') + session_id_digest = Digest::SHA256.hexdigest(simple.session.id.inspect) + expect(simple.rucaptcha_sesion_key_key).to eq ['rucaptcha-session', session_id_digest].join(':') end end