Skip to content

Commit

Permalink
Remove duplicated method
Browse files Browse the repository at this point in the history
This method, and the commit it belongs to, appeared twice after
merging master into the staging-workflow branch.

The first time this commit got added was with the previous master
merge (#6250).

There was a small difference between both methods. I removed the one
that differed from the one we have in master.
  • Loading branch information
bgeuken committed Nov 21, 2018
1 parent 356b43f commit 0d2048e
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/api/test/functional/request_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -890,36 +890,6 @@ def test_create_request_with_approver
approver: 'Iggy' })
end

def test_create_request_with_approver
req_template = <<~XML_REQUEST
<request>
<action type="submit">
<source project="home:Iggy" package="TestPack" rev="1"/>
<target project="home:fred" package="foopkg"/>
</action>
<review by_group="test_group"/>
<state approver="%<approver>s"/>
</request>
XML_REQUEST

login_Iggy
# request creation fails because we are not admin
post '/request?cmd=create', params: format(req_template, approver: 'fred')
assert_response 403
assert_xml_tag(tag: 'status', attributes: { code: 'create_bs_request_not_authorized' })
assert_xml_tag(tag: 'summary', content: 'You are not authorized to create this Bs request.')

# request creation succeeds because we are "Iggy"
post '/request?cmd=create', params: format(req_template, approver: 'Iggy')
assert_response :success

# as admin it should work
login_king
# request creation succeeds because we are "Iggy"
post '/request?cmd=create', params: format(req_template, approver: 'Iggy')
assert_response :success
end

def test_create_request_and_supersede
login_Iggy
req = load_backend_file('request/works')
Expand Down

0 comments on commit 0d2048e

Please sign in to comment.