Sha256: 6a4b0f24c90f5e49b99c7168828d6af1b1f79d096bb873f630ae7802bc270135
Contents?: true
Size: 1.27 KB
Versions: 20
Compression:
Stored size: 1.27 KB
Contents
require "spec_helper" require "fog/brightbox/models/compute/database_server" describe Brightbox::DatabaseServer do describe ".clean_arguments" do let(:parameters) { Brightbox::DatabaseServer.clean_arguments(arguments) } context "when no arguments" do let(:arguments) { {} } it { expect(parameters.keys).to be_empty } end context "when --allow-access=10.0.0.0" do let(:arguments) { { "allow-access" => "10.0.0.0" } } it { expect(parameters[:allow_access]).to eql(["10.0.0.0"]) } end context "when --allow-access=10.0.0.0,11.0.0.0" do let(:arguments) { { "allow-access" => "10.0.0.0,11.0.0.0" } } it { expect(parameters[:allow_access]).to eql(%w(10.0.0.0 11.0.0.0)) } end context "when --maintenance-weekday=4" do let(:arguments) { { "maintenance-weekday" => "4" } } it { expect(parameters[:maintenance_weekday]).to eql("4") } end context "when --maintenance-weekday=wednesday" do let(:arguments) { { "maintenance-weekday" => "3" } } it { expect(parameters[:maintenance_weekday]).to eql("3") } end context "when --maintenance-weekday=" do let(:arguments) { { "maintenance-weekday" => "" } } it { expect(parameters[:maintenance_weekday]).to be_nil } end end end
Version data entries
20 entries across 20 versions & 1 rubygems