require File.dirname(__FILE__) + '/../spec_helper'

describe ApplicationController do
  it "should give 403 when denying access" do
    get 'access_denied'
    response.headers["Status"].should == "403 Forbidden"
  end
  
  it "should flash with a wrong request" do
    get 'unknown_request'
    response.should be_redirect
    response.should redirect_to(documents_url)
    flash[:warning].should == "Unknown URL"
  end
end
require File.dirname(__FILE__) + '/../spec_helper'

describe ApplicationController do
  it "should give 403 status when denying access" do
    get 'access_denied'
    response.headers["Status"].should == "403 Forbidden"
  end
  
  it "should render 'Access denied' text when denying access" do
    get 'access_denied'
    response.body.should == 'Access denied'
  end
  
  it "should flash a warning if given a wrong request" do
    get 'unknown_request'
    response.should be_redirect
    response.should redirect_to(documents_url)
    flash[:warning].should == "Unknown URL"
  end
end
Access denied specs. Preparing views specs.
Access denied specs.
Preparing views specs.

git-svn-id: 52e2e43ce7a15623d54ec01c4d971b259c993eed@215 354c73f7-f838-4446-8ec5-bf0d774acd2b
