Skip to content

Commit

Permalink
[ci] Add tests for anonymous access of global_command actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Oct 17, 2016
1 parent 74b1ff1 commit 527ed59
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/api/test/functional/source_controller_test.rb
Expand Up @@ -61,16 +61,24 @@ def test_get_packagelist
end

def test_post_orderkiwirepos
post '/source?cmd=orderkiwirepos'
assert_response 401

login_tom
post '/source?cmd=orderkiwirepos'
assert_response 400
assert_xml_tag tag: 'status', attributes: { code: "400", origin: "backend" }
# api handed it over to backend, enough tested here
end

def test_anonymous_access_for_global_commands
post '/source?cmd=orderkiwirepos'
assert_response 401

post '/source?cmd=createmaintenanceincident'
assert_response 401

post '/source/kde4?cmd=branch'
assert_response 401
end

def test_get_packagelist_with_hidden_project
login_tom
get '/source/HiddenProject'
Expand Down

0 comments on commit 527ed59

Please sign in to comment.