Fix specs
This commit is contained in:
@@ -7,7 +7,7 @@ class CommunitiesController < ApplicationController
|
|||||||
skip_authorization_check
|
skip_authorization_check
|
||||||
|
|
||||||
def show
|
def show
|
||||||
redirect_to root_path unless Setting['community'].present?
|
redirect_to root_path unless Setting['feature.community'].present?
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -327,7 +327,6 @@ feature 'Budget Investments' do
|
|||||||
within("#investment_code") do
|
within("#investment_code") do
|
||||||
expect(page).to have_content(investment.id)
|
expect(page).to have_content(investment.id)
|
||||||
end
|
end
|
||||||
expect(page).to have_content "Access the community"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Can access the community' do
|
scenario 'Can access the community' do
|
||||||
|
|||||||
@@ -305,6 +305,8 @@ feature 'Commenting topics' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario "Flagging turbolinks sanity check", :js do
|
scenario "Flagging turbolinks sanity check", :js do
|
||||||
|
Setting['feature.community'] = true
|
||||||
|
|
||||||
community = proposal.community
|
community = proposal.community
|
||||||
topic = create(:topic, community: community, title: "Should we change the world?")
|
topic = create(:topic, community: community, title: "Should we change the world?")
|
||||||
comment = create(:comment, commentable: topic)
|
comment = create(:comment, commentable: topic)
|
||||||
@@ -317,6 +319,8 @@ feature 'Commenting topics' do
|
|||||||
page.find("#flag-expand-comment-#{comment.id}").click
|
page.find("#flag-expand-comment-#{comment.id}").click
|
||||||
expect(page).to have_selector("#flag-comment-#{comment.id}")
|
expect(page).to have_selector("#flag-comment-#{comment.id}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Setting['feature.community'] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Erasing a comment's author" do
|
scenario "Erasing a comment's author" do
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ feature 'Communities' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Should redirect root path when communities are disabled' do
|
scenario 'Should redirect root path when communities are disabled' do
|
||||||
|
Setting['feature.community'] = nil
|
||||||
proposal = create(:proposal)
|
proposal = create(:proposal)
|
||||||
community = proposal.community
|
community = proposal.community
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user