Sha256: dadff5be85833d6193efd0ec25bee18999174c8a2d9dbeefe5a94ce9808268a5
Contents?: true
Size: 1.29 KB
Versions: 15
Compression:
Stored size: 1.29 KB
Contents
RSpec.describe ChefVault::ChefApi do let(:root_url) { "https://localhost" } let(:scoped_url) { "https://localhost/organizations/fakeorg" } let(:api_v0_hash) { { :api_version => "0" } } let(:api_v1_hash) { { :api_version => "1" } } before do Chef::Config[:chef_server_root] = root_url Chef::Config[:chef_server_url] = scoped_url end describe "#rest_v0" do it "returns an instance of Chef::ServerAPI set to use API version 0 scoped to root" do expect(Chef::ServerAPI).to receive(:new).with(root_url, api_v0_hash) subject.rest_v0 end end describe "#rest_v1" do it "returns an instance of Chef::ServerAPI set to use API version 0 scoped to root" do expect(Chef::ServerAPI).to receive(:new).with(root_url, api_v1_hash) subject.rest_v1 end end describe "#org_scoped_rest_v0" do it "returns an instance of Chef::ServerAPI set to use API version 0 scoped to root" do expect(Chef::ServerAPI).to receive(:new).with(scoped_url, api_v0_hash) subject.org_scoped_rest_v0 end end describe "#org_scoped_rest_v1" do it "returns an instance of Chef::ServerAPI set to use API version 0 scoped to root" do expect(Chef::ServerAPI).to receive(:new).with(scoped_url, api_v1_hash) subject.org_scoped_rest_v1 end end end
Version data entries
15 entries across 15 versions & 1 rubygems