diff --git a/app/views/application/_footer.html.erb b/app/views/application/_footer.html.erb index 71df46c9..856d795d 100644 --- a/app/views/application/_footer.html.erb +++ b/app/views/application/_footer.html.erb @@ -1,17 +1,9 @@ -
© - <%= " " %> - <%= link_to "HPI Enterprise Platform and Integration Concepts", 'https://hpi.de/plattner/home.html' %> - <%= ' - ' %> - <%= link_to "Legal Notice", 'https://hpi.de/en/impressum.html' %> -
-VM Name | +<%= @request.name %> | +|
CPU cores | +<%= @request.cpu_cores %> | +|
RAM in GB | +<%= @request.ram_gb %> | +|
Storage in GB | +<%= @request.storage_gb %> | +|
Operating System | +<%= @request.operating_system %> | +|
Port | +<%= @request.port %> | +|
Application Name | +<%= @request.application_name %> | +|
Description | +<%= @request.description %> | +|
Comment | +<%= @request.comment %> | +|
Status | +<%= @request.status %> | +|
Responsible users | +
+ <% @request.responsible_users.each do |user| %>
+ <%= user.email %> + <% end %> + |
+ |
Users with sudo rights | +
+ <% @request.sudo_user_assignments.each do |assignment| %>
+ <%= assignment.user.email %> + <% end %> + |
+ |
Users | +
+ <% @request.non_sudo_user_assignments.each do |assignment| %>
+ <%= assignment.user.email %> + <% end %> + |
+ |
VM Name | -<%= @request.name %> | -|
CPU cores | -<%= @request.cpu_cores %> | -|
RAM in GB: | -<%= @request.ram_gb %> | -|
Storage in GB: | -<%= @request.storage_gb %> | -|
Operating System | -<%= @request.operating_system %> | -|
Port | -<%= @request.port %> | -|
Application Name | -<%= @request.application_name %> | -|
Description | -<%= @request.description %> | -|
Comment | -<%= @request.comment %> | -|
Status | -<%= @request.status %> | -|
Responsible users | +Rejection Information |
- <% @request.responsible_users.each do |user| %>
- <%= user.email %> - <% end %> - |
-
Users with sudo rights | -
- <% @request.sudo_user_assignments.each do |assignment| %>
- <%= assignment.user.email %> - <% end %> - |
- |
Users | +
- <% @request.non_sudo_user_assignments.each do |assignment| %>
- <%= assignment.user.email %> - <% end %> - |
- Rejection Information: - <%= @request.rejection_information %> -
-<% end %> <%= link_to 'Back', requests_path, class: "btn btn-secondary" %> \ No newline at end of file diff --git a/spec/features/requests/accept_reject_request_spec.rb b/spec/features/requests/accept_reject_request_spec.rb index 1d2f384e..70f73a43 100644 --- a/spec/features/requests/accept_reject_request_spec.rb +++ b/spec/features/requests/accept_reject_request_spec.rb @@ -36,17 +36,23 @@ context 'with a filled in rejection information field' do before do - page.fill_in 'request[rejection_information]', with: 'Info' + @rejection_info = 'a reason why the VM request was rejected' + page.fill_in 'request[rejection_information]', with: @rejection_info click_button('rejectButton') end it 'saves the rejection information' do request.reload - expect(request.rejection_information).to eq('Info') + expect(request.rejection_information).to eq(@rejection_info) end - it 'shows rejection information' do - expect(page).to have_text('Info') + it 'shows the rejection information' do + request.reload + expect(page).to have_text(@rejection_info) + end + + it 'redirects to the requests path' do + expect(page).to have_current_path(requests_path) end end end