fix specs

This commit is contained in:
bilal
2020-06-18 20:23:57 +02:00
parent 88ec777299
commit 71273a597e
3 changed files with 26 additions and 7 deletions

View File

@@ -48,10 +48,8 @@ class ContractsController < ApplicationController
# Native release contracts must be generated on-the-fly; non-native releases have a contract attachment
if releasable.native?
send_file contract.to_pdf, download_attributes
elsif policy(contract).show?
redirect_to releasable.contract.service_url
else
raise Pundit::NotAuthorizedError
redirect_to releasable.contract.service_url
end
end
end