Use the new name in default settings
This commit is contained in:
@@ -203,11 +203,11 @@ class Setting < ApplicationRecord
|
||||
end
|
||||
|
||||
def default_main_org_name
|
||||
"CONSUL"
|
||||
"CONSUL DEMOCRACY"
|
||||
end
|
||||
|
||||
def default_mailer_from_address
|
||||
"noreply@#{Tenant.current_host.presence || "consul.dev"}"
|
||||
"noreply@#{Tenant.current_host.presence || "consuldemocracy.dev"}"
|
||||
end
|
||||
|
||||
def reset_defaults
|
||||
|
||||
@@ -2,21 +2,21 @@ section "Creating Settings" do
|
||||
Setting.reset_defaults
|
||||
|
||||
{
|
||||
"facebook_handle": "CONSUL",
|
||||
"facebook_handle": "CONSUL DEMOCRACY",
|
||||
"feature.featured_proposals": "true",
|
||||
"feature.map": "true",
|
||||
"instagram_handle": "CONSUL",
|
||||
"instagram_handle": "CONSUL DEMOCRACY",
|
||||
"meta_description": "Citizen participation tool for an open, "\
|
||||
"transparent and democratic government",
|
||||
"meta_keywords": "citizen participation, open government",
|
||||
"meta_title": "CONSUL",
|
||||
"meta_title": "CONSUL DEMOCRACY",
|
||||
"proposal_code_prefix": "MAD",
|
||||
"proposal_notification_minimum_interval_in_days": 0,
|
||||
"telegram_handle": "CONSUL",
|
||||
"twitter_handle": "@consul_dev",
|
||||
"twitter_hashtag": "#consul_dev",
|
||||
"telegram_handle": "CONSUL DEMOCRACY",
|
||||
"twitter_handle": "@consuldemocracy_dev",
|
||||
"twitter_hashtag": "#consuldemocracy_dev",
|
||||
"votes_for_proposal_success": "100",
|
||||
"youtube_handle": "CONSUL"
|
||||
"youtube_handle": "CONSUL DEMOCRACY"
|
||||
}.each do |name, value|
|
||||
Setting[name] = value
|
||||
end
|
||||
|
||||
@@ -189,7 +189,7 @@ describe Setting do
|
||||
|
||||
describe ".default_org_name" do
|
||||
it "returns the main org name for the default tenant" do
|
||||
expect(Setting.default_org_name).to eq "CONSUL"
|
||||
expect(Setting.default_org_name).to eq "CONSUL DEMOCRACY"
|
||||
end
|
||||
|
||||
it "returns the tenant name for other tenants" do
|
||||
@@ -216,8 +216,8 @@ describe Setting do
|
||||
context "empty default host" do
|
||||
before { allow(Tenant).to receive(:default_host).and_return("") }
|
||||
|
||||
it "uses consul.dev as host" do
|
||||
expect(Setting.default_mailer_from_address).to eq "noreply@consul.dev"
|
||||
it "uses consuldemocracy.dev as host" do
|
||||
expect(Setting.default_mailer_from_address).to eq "noreply@consuldemocracy.dev"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -314,6 +314,8 @@ describe "Budget Investments" do
|
||||
end
|
||||
|
||||
scenario "Support investments on behalf of someone else when there are more headings" do
|
||||
Setting["org_name"] = "CONSUL"
|
||||
|
||||
create(:budget_investment, heading: heading, title: "Default heading investment")
|
||||
create(:budget_investment, heading: create(:budget_heading, group: group))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user