Skip to content

Commit

Permalink
Tweak spec wording
Browse files Browse the repository at this point in the history
  • Loading branch information
petems committed Aug 6, 2013
1 parent 254c2ec commit efac87d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/cli/verify_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
include_context "spec"

describe "verify" do
it "returns happy string when verify passes" do
it "returns confirmation text when verify passes" do
stub_request(:get, "https://api.digitalocean.com/droplets?api_key=#{api_key}&client_id=#{client_key}").
to_return(:status => 200)
@cli.verify
expect($stdout.string).to eq "Authentication with DigitalOcean was successful.\n"
expect(a_request(:get, "https://api.digitalocean.com/droplets?api_key=#{api_key}&client_id=#{client_key}")).to have_been_made
end

it "returns unhappy string when verify passes" do
it "returns error string when verify fails" do
stub_request(:get, "https://api.digitalocean.com/droplets?api_key=#{api_key}&client_id=#{client_key}").
to_return(:status => 401, :body => '{"status":"ERROR", "message":"Access Denied"}')
expect { @cli.resize("verify") }.to raise_error(SystemExit)
Expand Down

0 comments on commit efac87d

Please sign in to comment.