diff --git a/app/controllers/communities_controller.rb b/app/controllers/communities_controller.rb index 68948cc65..3462c8425 100644 --- a/app/controllers/communities_controller.rb +++ b/app/controllers/communities_controller.rb @@ -7,7 +7,7 @@ class CommunitiesController < ApplicationController skip_authorization_check def show - redirect_to root_path unless Setting['community'].present? + redirect_to root_path unless Setting['feature.community'].present? end private diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 86e5d4dc8..ef2c1bf5b 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -327,7 +327,6 @@ feature 'Budget Investments' do within("#investment_code") do expect(page).to have_content(investment.id) end - expect(page).to have_content "Access the community" end scenario 'Can access the community' do diff --git a/spec/features/comments/topics_spec.rb b/spec/features/comments/topics_spec.rb index 6c4c36d16..c72e8028d 100644 --- a/spec/features/comments/topics_spec.rb +++ b/spec/features/comments/topics_spec.rb @@ -305,6 +305,8 @@ feature 'Commenting topics' do end scenario "Flagging turbolinks sanity check", :js do + Setting['feature.community'] = true + community = proposal.community topic = create(:topic, community: community, title: "Should we change the world?") comment = create(:comment, commentable: topic) @@ -317,6 +319,8 @@ feature 'Commenting topics' do page.find("#flag-expand-comment-#{comment.id}").click expect(page).to have_selector("#flag-comment-#{comment.id}") end + + Setting['feature.community'] = nil end scenario "Erasing a comment's author" do diff --git a/spec/features/communities_spec.rb b/spec/features/communities_spec.rb index 7678c5678..92111b91b 100644 --- a/spec/features/communities_spec.rb +++ b/spec/features/communities_spec.rb @@ -111,6 +111,7 @@ feature 'Communities' do end scenario 'Should redirect root path when communities are disabled' do + Setting['feature.community'] = nil proposal = create(:proposal) community = proposal.community