Fix specs

This commit is contained in:
taitus
2017-08-29 17:21:40 +02:00
parent e1a7f9c58c
commit 5d22558c2b
4 changed files with 6 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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