diff --git a/features/caching.feature b/features/caching.feature deleted file mode 100644 index ba2efd9..0000000 --- a/features/caching.feature +++ /dev/null @@ -1,30 +0,0 @@ -Feature: caching - As a user - I want to see the contents according with my language - Even with the contents being cached - - Background: - Given the cache is turned on - And the following user - | login | name | - | mario | Mario | - And I am logged in as "mario" - - Scenario: blog view page - Given the following blogs - | owner | name | display_posts_in_current_language | visualization_format | - | mario | Sample Blog | false | short | - And the following articles - | owner | name | parent | - | mario | Post1 | Sample Blog | - | mario | Post2 | Sample Blog | - When I go to article "Sample Blog" - Then I should see "no comments yet" - When I follow "Português" - Then I should see "sem comentários ainda" - - Scenario: blocks - Given I am on Mario's homepage - Then I should see "Recent content" - When I follow "Português" - Then I should see "Conteúdo recente" diff --git a/test/unit/article_test.rb b/test/unit/article_test.rb index 963ccbb..5204e9e 100644 --- a/test/unit/article_test.rb +++ b/test/unit/article_test.rb @@ -759,6 +759,11 @@ class ArticleTest < ActiveSupport::TestCase assert_match(/-version-2/,a.cache_key(:version => 2)) end + should 'use language in cache key' do + a = Article.new + assert_not_equal a.cache_key({}, nil, ''), a.cache_key({}, nil, 'pt') + end + should 'not be highlighted by default' do a = Article.new refute a.highlighted diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb index ca16490..95277d0 100644 --- a/test/unit/block_test.rb +++ b/test/unit/block_test.rb @@ -303,6 +303,11 @@ class BlockTest < ActiveSupport::TestCase assert_equal block.cache_key('en'), block.cache_key('en', person) end + should 'use language in cache key' do + block = Block.new + assert_not_equal block.cache_key('en'), block.cache_key('pt') + end + should 'display block to members of community for display_user = members' do community = fast_create(Community) user = create_user('testinguser') -- libgit2 0.21.2