@@ -24,7 +24,7 class ProjectsController < ApplicationController | |||
|
24 | 24 | before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy] |
|
25 | 25 | before_filter :authorize_global, :only => [:new, :create] |
|
26 | 26 | before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] |
|
27 | accept_key_auth :index, :create, :update, :destroy | |
|
27 | accept_key_auth :index, :show, :create, :update, :destroy | |
|
28 | 28 | |
|
29 | 29 | after_filter :only => [:create, :edit, :update, :archive, :unarchive, :destroy] do |controller| |
|
30 | 30 | if controller.request.post? |
@@ -32,6 +32,12 class ApiTest::ProjectsTest < ActionController::IntegrationTest | |||
|
32 | 32 | assert_equal 'application/xml', @response.content_type |
|
33 | 33 | end |
|
34 | 34 | |
|
35 | context "GET /projects/2.xml" do | |
|
36 | # TODO: A private project is needed because should_allow_api_authentication | |
|
37 | # actually tests that authentication is *required*, not just allowed | |
|
38 | should_allow_api_authentication(:get, "/projects/2.xml") | |
|
39 | end | |
|
40 | ||
|
35 | 41 | def test_show |
|
36 | 42 | get '/projects/1.xml' |
|
37 | 43 | assert_response :success |
General Comments 0
You need to be logged in to leave comments.
Login now