before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy]
before_filter :authorize_global, :only => [:new, :create]
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
- accept_key_auth :index, :create, :update, :destroy
+ accept_key_auth :index, :show, :create, :update, :destroy
after_filter :only => [:create, :edit, :update, :archive, :unarchive, :destroy] do |controller|
if controller.request.post?
assert_equal 'application/xml', @response.content_type
end
+ context "GET /projects/2.xml" do
+ # TODO: A private project is needed because should_allow_api_authentication
+ # actually tests that authentication is *required*, not just allowed
+ should_allow_api_authentication(:get, "/projects/2.xml")
+ end
+
def test_show
get '/projects/1.xml'
assert_response :success