Skip to content

Commit

Permalink
Added spec for garbage url handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Mar 17, 2010
1 parent 3053c66 commit e99f4c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/controllers/forums_controller_spec.rb
Expand Up @@ -150,6 +150,12 @@
end
end

describe ForumsController, " requesting garbage url" do
it "should raise ResourceMismatch" do
lambda { get :index, :resource_path => "/forums/\ncrayzeee" }.should raise_error(Ardes::ResourcesController::ResourceMismatch)
end
end

describe ForumsController, " requesting / (testing resource_path)" do
it "should generate params { :controller => 'forums', :action => 'index', :resource_path => '/forums' } from GET /" do
params_from(:get, "/").should == { :controller => 'forums', :action => 'index', :resource_path => '/forums' }
Expand Down

0 comments on commit e99f4c6

Please sign in to comment.