Sha256: 811d7c22e71abb5a636cd47f6b6cd4da7dbbdde5aabca1611b3b72cbcfd15022
Contents?: true
Size: 937 Bytes
Versions: 1
Compression:
Stored size: 937 Bytes
Contents
# -*- encoding: utf-8 -*- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Simplenet::Client::Anycast do before(:all) do @conf = {:url => "http://localhost:8081"} @conn = Simplenet::Client::Connection.new(@conf) end before do @cidr = random_cidr end subject { @conn.anycasts } it "creates a new anycast" do resp = subject.create(@cidr) expect(resp["cidr"]).to eql(@cidr) end it "lists all anycasts" do subject.create(@cidr) list = subject.list.map{|dc| dc["cidr"]} expect(list).to include(@cidr) end it "shows a single anycast by uuid" do resp = subject.create(@cidr) show = subject.show(resp["id"]) expect(show["cidr"]).to eql(@cidr) end it "deletes a anycast" do id = subject.create(random_cidr)["id"] subject.delete(id) list = subject.list.map{|dc| dc["cidr"]} expect(list).to_not include(@cidr) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simplenet-client-0.2.0 | ./spec/simplenet/client/anycast_spec.rb |