spec/commands/sql/instances/show_spec.rb in brightbox-cli-3.3.0 vs spec/commands/sql/instances/show_spec.rb in brightbox-cli-4.0.0.rc2
- old
+ new
@@ -1,8 +1,8 @@
require "spec_helper"
-describe "brghtbox sql instances" do
+describe "brightbox sql instances" do
describe "show" do
let(:output) { FauxIO.new { Brightbox.run(argv) } }
let(:stdout) { output.stdout }
let(:stderr) { output.stderr }
@@ -10,28 +10,28 @@
config = config_from_contents(USER_APP_CONFIG_CONTENTS)
cache_access_token(config, "1234567890")
end
context "when id does not exist" do
- let(:argv) { %w(sql instances show dbs-12345) }
+ let(:argv) { %w[sql instances show dbs-12345] }
let(:json_response) do
"{\"error_name\":\"missing_resource\",\"errors\":[\"Resource not found using supplied identifier\"]}"
end
before do
- stub_request(:get, "http://api.brightbox.dev/1.0/database_servers/dbs-12345?account_id=acc-12345").
- to_return(:status => 404, :body => json_response, :headers => { "Content-Type" => "" })
+ stub_request(:get, "http://api.brightbox.localhost/1.0/database_servers/dbs-12345?account_id=acc-12345")
+ .to_return(:status => 404, :body => json_response, :headers => { "Content-Type" => "" })
end
it "reports error" do
expect(stderr).to include("ERROR: Couldn't find an SQL instance with ID dbs-12345")
expect(stdout).to be_empty
end
end
context "when id exists" do
- let(:argv) { %w(sql instances show dbs-12345) }
+ let(:argv) { %w[sql instances show dbs-12345] }
let(:json_response) do
<<-EOS
{
"id":"dbs-12345",
@@ -59,11 +59,11 @@
}
EOS
end
before do
- stub_request(:get, "http://api.brightbox.dev/1.0/database_servers/dbs-12345?account_id=acc-12345").
- to_return(:status => 200, :body => json_response, :headers => { "Content-Type" => "" })
+ stub_request(:get, "http://api.brightbox.localhost/1.0/database_servers/dbs-12345?account_id=acc-12345")
+ .to_return(:status => 200, :body => json_response, :headers => { "Content-Type" => "" })
end
it "simplifies the maintenance window" do
expect(stdout).to include("maintenance_window: Sunday 06:00 UTC")
expect(stderr).to be_empty