Skip to content
Browse files

fix routes for DELETE /inodes/:inode

  • Loading branch information...
1 parent b189717 commit be889dffd01b6213c853e755bd48c4c667cfb0ca Kevin Olbrich committed Mar 25, 2013
Showing with 10 additions and 1 deletion.
  1. +1 −1 app/controllers/inodes.rb
  2. +1 −0 models/capability.rb
  3. +8 −0 spec/controllers/inodes_controller_spec.rb
View
2 app/controllers/inodes.rb
@@ -71,7 +71,7 @@
end
# Deletes
- delete :index do
+ delete :index, "/inodes/:uuid" do
logger.info('DELETE - inodes#index')
uuid = params.delete('uuid')
View
1 models/capability.rb
@@ -15,6 +15,7 @@ class Capability < Base::Capability
# )
SUPPORTED_CAPABILITIES = %w(
inode
+ inode_delete
machines
machines_readings
machine
View
8 spec/controllers/inodes_controller_spec.rb
@@ -42,4 +42,12 @@
last_response.should be_ok
end
end
+
+ describe 'DELETE /inodes/:inode' do
+ it "should be successful" do
+ inode.should_receive(:delete).and_return(true)
+ delete '/inodes/inode_id'
+ last_response.should be_empty
+ end
+ end
end

0 comments on commit be889df

Please sign in to comment.
Something went wrong with that request. Please try again.