Skip to content

Commit

Permalink
delete snapshot api test
Browse files Browse the repository at this point in the history
  • Loading branch information
TonySchneider committed Apr 4, 2023
1 parent 3ae2239 commit 5409e74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/requests/cloud_volume_snapshots_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,16 @@
expect_bad_request(/Feature not .*supported/)
end
end

describe "DELETE /api/cloud_volumes/:c_id/cloud_volume_snapshots/:s_id" do
it "create & delete cloud volume snapshot" do
api_basic_authorize('cloud_volume_snapshot_delete')

stub_supports(CloudVolumeSnapshot, :delete)
post(api_cloud_volume_snapshot_url(nil, cloud_volume_snapshot), :params => gen_request(:delete))

expect_single_action_result(:success => true, :message => /Deleting Cloud Volume Snapshot id: #{cloud_volume_snapshot.id} name: '#{cloud_volume_snapshot.name}'/)
end
end
end
end

0 comments on commit 5409e74

Please sign in to comment.