mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user