Sha256: 3b2c83e14ebf4a0d55b92f4e6b8035c48e8f4b1038296df606516204dd478e82
Contents?: true
Size: 1012 Bytes
Versions: 3
Compression:
Stored size: 1012 Bytes
Contents
require 'spec_helper' describe Smartdc::Api::Machines::Tags do let(:id) do VCR.use_cassette('machines/index') { Smartdc.machines.content.first['id'] } end describe ".create_machine_tag", vcr: { cassette_name: 'machines/tags/create' } do let(:tag) { { key: :value } } it "creates a new machine tag" do expect(Smartdc.create_machine_tag(id, tag).content.count).to be > 0 end end describe ".machine_tags", vcr: { cassette_name: 'machines/tags/index' } do it "receives list of machine tags" do expect(Smartdc.machine_tags(id).content.count).to be > 0 end end describe ".machine_tag", vcr: { cassette_name: 'machines/tags/show' } do it "receives a machine tag" do expect(Smartdc.machine_tag(id, 'key').content).to eq('"value"') end end describe ".destroy_machine_tag", vcr: { cassette_name: 'machines/tags/destroy' } do it "removes a machine tag" do expect(Smartdc.destroy_machine_tag(id, 'key').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/tags_spec.rb |
smartdc-2.0.1 | spec/smartdc/api/machines/tags_spec.rb |
smartdc-2.0.0 | spec/smartdc/api/machines/tags_spec.rb |