Skip to content

Commit

Permalink
Wat
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Jan 28, 2016
1 parent 2ebe8f5 commit 594611b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/views/glucose_measurements/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<p>
<%= f.submit class: 'btn btn-success' %>

</p>
<% end %>

Expand Down
7 changes: 7 additions & 0 deletions app/views/glucose_measurements/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

<%= render 'form' %>
<%= link_to 'Delete', glucose_measurement_path(@glucose_measurement),
class: 'btn btn-warning',
method: :delete,
data: {
confirm: 'Are you sure?'
} %>
<%= link_to 'Back', glucose_measurements_path, class: 'btn btn-default' %>
1 change: 0 additions & 1 deletion spec/controllers/glucose_measurements_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@

describe 'DELETE #destroy' do
let! (:test_measurement) { create :glucose_measurement }

it 'deletes the measurement' do
expect {
delete :destroy, id: test_measurement
Expand Down
1 change: 1 addition & 0 deletions spec/requests/glucose_measurements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
visit glucose_measurements_path(as: user)
click_link '12:00'
expect(page).to have_content 'BG measurement'
expect(page).to have_content 'Delete'
end
end
end

0 comments on commit 594611b

Please sign in to comment.