Move FAQ, Terms of Service, and Privacy Policy into topics in the Staff category. First post of those topics will be rendered on their respective pages. Site settings and content are not used for these documents anymore. Translations of the default text is moved into the standard YML files.

This commit is contained in:
Neil Lalonde
2014-07-24 14:27:34 -04:00
parent e6819f8879
commit 5a33e6f00c
10 changed files with 423 additions and 43 deletions

View File

@ -3,6 +3,13 @@ require 'spec_helper'
describe StaticController do
context 'show' do
before do
post = create_post
SiteSetting.stubs(:tos_topic_id).returns(post.topic.id)
SiteSetting.stubs(:guidelines_topic_id).returns(post.topic.id)
SiteSetting.stubs(:privacy_topic_id).returns(post.topic.id)
end
context "with a static file that's present" do
before do
@ -14,7 +21,8 @@ describe StaticController do
end
it "renders the file" do
response.should render_template('static/faq.en')
response.should render_template('static/show')
assigns(:page).should == 'faq'
end
end
@ -24,7 +32,8 @@ describe StaticController do
context "when #{setting_name} site setting is NOT set" do
it "renders the #{id} page" do
expect(subject).to render_template("static/#{id}.en")
expect(subject).to render_template("static/show")
assigns(:page).should == id
end
end