Skip to content

Commit

Permalink
[ci] Fix test failure in API test (maintenance_test.rb)
Browse files Browse the repository at this point in the history
The old test was not correct and the user never had the correct
permissions. So we needed to fix the old test case and tested for the
correct response code (:forbidden).
  • Loading branch information
Manuel Schnitzer authored and bgeuken committed Mar 8, 2017
1 parent 7c9560d commit 7a85a3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/test/functional/maintenance_test.rb
Expand Up @@ -965,8 +965,15 @@ def test_create_maintenance_project_and_release_packages

# set an invalid
post "/source/#{incidentProject}/_attribute", params: "<attributes><attribute namespace='OBS' name='EmbargoDate'><value>INVALID_DATE_STRING</value></attribute></attributes>"
assert_response :forbidden

# EmbargoDate is needed for test for releasing packages
login_king
post "/source/#{incidentProject}/_attribute", params: "<attributes><attribute namespace='OBS' name='EmbargoDate'><value>INVALID_DATE_STRING</value></attribute></attributes>"
assert_response :success

prepare_request_with_user 'maintenance_coord', 'buildservice'

# create some changes, including issue tracker references
Timecop.freeze(1)
put '/source/' + incidentProject + '/pack2.BaseDistro2.0_LinkedUpdateProject/dummy.changes', params: 'DUMMY bnc#1042'
Expand Down

0 comments on commit 7a85a3f

Please sign in to comment.