#{time_ago_in_words(trigger.last_trigger_request.created_at)} ago
-iftrigger.last_used
#{time_ago_in_words(trigger.last_used)} ago
-else
Never
%td.text-right
=link_to'Revoke',namespace_project_trigger_path(@project.namespace,@project,trigger),data: {confirm: 'Are you sure?'},method: :delete,class: "btn btn-warning btn-sm"
%td.text-right.trigger-actions
-take_ownership_confirmation="By taking ownership you will bind this trigger to your user account. With this the trigger will have access to all your projects as if it was you. Are you sure?"
-revoke_trigger_confirmation="By revoking a trigger you will break any processes making use of it. Are you sure?"
scenario'button "Take ownership" has correct alert'do
expected_alert='By taking ownership you will bind this trigger to your user account. With this the trigger will have access to all your projects as if it was you. Are you sure?'