Sha256: 5919569da28b4dcf1bf17dddf2b6830205fb4f0c6b34670a34d948566bc7443f
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
require 'spec_helper' describe Smartdc::Api::Machines::Snapshots do let(:snapshot) { { name: 'example' } } let(:id) do VCR.use_cassette('machines/index') { Smartdc.machines.content.first['id'] } end describe ".create_machine_snapshot", vcr: { cassette_name: 'machines/snapshots/create' } do it "creates a new machine snapshot" do expect(Smartdc.create_machine_snapshot(id, snapshot).content.count).to be > 0 end end describe ".machine_snapshots", vcr: { cassette_name: 'machines/snapshots/index' } do it "receives list of machine snapshots" do expect(Smartdc.machine_snapshots(id).content.count).to be > 0 end end describe ".machine_snapshot", vcr: { cassette_name: 'machines/snapshots/show' } do it "receives a machine snapshot" do expect(Smartdc.machine_snapshot(id, snapshot[:name]).content['name']).to eq(snapshot[:name]) end end describe ".start_machine_snapshot", vcr: { cassette_name: 'machines/snapshots/start' } do it "starts a machine snapshot" do expect(Smartdc.start_machine_snapshot(id, snapshot[:name]).status).to eq(202) end end describe ".destroy_machine_snapshot", vcr: { cassette_name: 'machines/snapshots/destroy' } do it "removes a machine snapshot" do expect(Smartdc.destroy_machine_snapshot(id, snapshot[:name]).status).to eq(204) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
smartdc-2.0.2 | spec/smartdc/api/machines/snapshots_spec.rb |
smartdc-2.0.1 | spec/smartdc/api/machines/snapshots_spec.rb |
smartdc-2.0.0 | spec/smartdc/api/machines/snapshots_spec.rb |