mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Initial release of Discourse
This commit is contained in:
27
spec/controllers/static_controller_spec.rb
Normal file
27
spec/controllers/static_controller_spec.rb
Normal file
@ -0,0 +1,27 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe StaticController do
|
||||
|
||||
context "with a static file that's present" do
|
||||
|
||||
before do
|
||||
xhr :get, :show, :id => 'faq'
|
||||
end
|
||||
|
||||
it 'renders the static file if present' do
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
it "renders the file" do
|
||||
response.should render_template('faq')
|
||||
end
|
||||
end
|
||||
|
||||
context "with a missing file" do
|
||||
it "should respond 404" do
|
||||
xhr :get, :show, :id => 'does-not-exist'
|
||||
response.response_code.should == 404
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user