diff --git a/features/http_caching.feature b/features/http_caching.feature index 59fc422..0f7a0b8 100644 --- a/features/http_caching.feature +++ b/features/http_caching.feature @@ -35,13 +35,13 @@ Feature: HTTP caching Then the response should be valid for 90 minutes Scenario: profile pages, default configuaration - When I go to João Silva's homepage + When I go to joao's homepage Then the response should be valid for 15 minutes Scenario: profile pages, custom configuration Given the following environment configuration | profile_cache_in_minutes | 90 | - When I go to João Silva's homepage + When I go to joao's homepage Then the response should be valid for 90 minutes Scenario: account controller should not be cached at all @@ -50,7 +50,7 @@ Feature: HTTP caching Scenario: profile administration Given I am logged in as "joao" - When I go to João Silva's control panel + When I go to joao's control panel Then there must be no cache at all Scenario: environment administration diff --git a/features/step_definitions/http_caching_steps.rb b/features/step_definitions/http_caching_steps.rb index e08d3cf..66a94d2 100644 --- a/features/step_definitions/http_caching_steps.rb +++ b/features/step_definitions/http_caching_steps.rb @@ -1,13 +1,13 @@ Then /^the response should be valid for (.+) minutes$/ do |n| - response.headers['Cache-Control'].split(/,\s*/).should include("max-age=#{n.to_i * 60}") + page.response_headers['Cache-Control'].split(/,\s*/).should include("max-age=#{n.to_i * 60}") end Then /^the cache should be public/ do - response.headers['Cache-Control'].split(/,\s*/).should include("public") + page.response_headers['Cache-Control'].split(/,\s*/).should include("public") end Then /^there must be no cache at all$/ do - parts = response.headers['Cache-Control'].split(/,\s*/) + parts = page.response_headers['Cache-Control'].split(/,\s*/) parts.should include('must-revalidate') parts.should include('max-age=0') end -- libgit2 0.21.2