diff --git a/test/rails_test.rb b/test/rails_test.rb index 822fc278..eb9616f2 100644 --- a/test/rails_test.rb +++ b/test/rails_test.rb @@ -40,8 +40,10 @@ def test_chooses_sets_alternatives_for_rails_tests def test_vanity_cookie_is_persistent get :index cookie = @response["Set-Cookie"].to_s - assert expires = cookie[/vanity_id=[a-f0-9]{32}; path=\/; expires=(.*)(;|$)/, 1] - assert_in_delta Time.parse(expires), Time.now + 1.month, 1.minute + assert_match cookie, /vanity_id=[a-f0-9]{32};/ + expires = cookie[/expires=(.*)(;|$)/, 1] + assert expires + assert_in_delta Time.parse(expires), Time.now + 1.month, 1.day end def test_vanity_cookie_default_id